![]() |
|
For PowerPC machines, see Xubuntu Help Online. |
Java, developed by Sun Microsystems, is and interpreted language which is compiled to bytecode. This bytecode can be run on any Java Virtual Machine, making Java a highly portable language. It is object oriented, has similar syntax to C and is designed to be secure.
Xubuntu supports both Java 1.5 and 1.6 in both Sun and Open Source flavors.
Read the Java license presented. You must accept it to continue.
To get your system to use Sun Java instead of the open-source (but less functional) GIJ that is installed by default, run:
sudo update-alternatives --config java
and choose the option that has j2re1.5-sun
in it.
Java 1.6 is also available, and can be installed by following the above directions, swapping all instances of 1.5 to 1.6
Read the Java license presented. You must accept it to continue.
To get your system to use Sun Java instead of the open-source (but less functional) GIJ that is installed by default, run:
sudo update-alternatives --config java
and choose the option that has j2re1.6-sun
in it.
Enter the following code into a text editor and save it as "Hello.java":
public class Hello { public static void main(String[] args) { System.out.println("Hello world"); } }
Open a terminal and compile your code by typing:
javac Hello.java
. You can then run your code by typing:
java Hello
The Eclipse platform provides a complete, extensible Java development environment.
Press Eclipse.
→ → to start usingThe Netbeans platform provides a complete, extensible Java development environment.