How to set up Java

Java, in its original conception, was meant to be independent of hardware which is of course exactly the opposite philosophy to the raspberry pi. There has however always been an intimate relationship between hardware and java with much early discussion of java on a chip and with the interpreted bytecode produced by the java compiler looking horribly like machine code with some dramatic exceptions. It is not slow - one has to be a pretty good C programmer to write C that is faster than byte code produced by the javac optimisers; its is fussy to set up so that it finds the relevant class files. This page is intended to condense the discussion on the java forum pages[]

Using Oracle's java recommended for the raspberry pi
See the oracle article []