The Java Development Kit (JDK) is installed on Cunix. The Java compiler is called javac. You can execute Java applets using a web browser, or using the standalone interpreter, which is called appletviewer.
Information about compatibility is available in the README file.
Complete JDK documentation and sample code is available.
The CLASSPATH environment variable is automatically set to the standard Java library, which is
/opt/jdk/lib/classes.zip. Some previous versions of the Java compiler required the user to set this. With the current version, the CLASSPATH variable must not be set, so that the compiler will set it.
Organizing Your Files
After compiling your Java source files to create class files, you should copy the class files to your web directory so they can be delivered to your web browser by the web server. Make sure the class files are publicly readable. Java source files are grouped into packages, and each package goes in a separate directory. So, if you have a gui package, you would first compile the Java source files:
$ cd ~/java
$ javac gui/*.java
then you would copy the class files to your web directory:
$ cp gui/*.class ~/public_html/cl/gui/.
$ chmod a+r ~/public_html/cl/gui/*
Users can also compile Java Applets on their Windows workstations at home.
Detailed information about Java is available on the Java Home Page.