Java Programming on pi - Raspberry Pi Forums


hello starting raspberry pi installed java how can progarm on pi?

daansander wrote:hello starting raspberry pi installed java how can progarm on pi?
if have up-to-date raspbian has got pre-installed oracle's fast arm java 8. can check in terminal via: java -version
mentioned because didn't java version installed, , example openjdk java nice not fast oracle's java.

can create java source file text editor (leafpad or mousepad etc, java editor jedit more comfortable), save file, example "myprogram.java", , use java compiler in terminal compile source file java machine-code (byte-code):

code: select all

javac myprogram.java
in case made no syntax errors in source file "myprogram.java", have binary file named "myprogram.class" in same folder can start in java virtual machine, via:

code: select all

java myprogram
fine small programs. sooner or later want use ide (integrated development environment). if have pi1, use lightweight ide named bluej that. if have faster pi2, use fatter comfortable netbeans ide oracle.

since both ides written in java, can download 1 of zip archives (in case of netbeans, select under download "platform: os independant zip"), unpack , run ide directly without installation. example in case of netbeans, start via "sh bin/netbeans" or give file runable rights , double click it.

luck!


raspberrypi



Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support