Tuesday, October 19, 2010

compile and run java program on ubuntu 10.04

After long time to learning java,i have never used gedit in ubuntu.i try used gedit in ubuntu to compile and running java program..following way :

1. You in Application > Accessories > gedit text editor



2. Save as Welcome.java to desktop or other directory

3. Now compile your file Welcome.java command with 
$javac Welcome.java

4. Now you will notice a class file “Welcome.class” on your Desktop.Now JVM    will execute this code through the command given below -
$ java Welcome

5. Then the java Program will be execute by jvm and you will see the following output.
Hello World!
Welcome to Java Programming! on Ubuntu 10.04


No comments: