As Java having its own slogan “Create once and run everywhere” , means its totally platform independent so jst adding the JVM(Java Virtual Machine) on Linux, you can execute the java applications on linux.
As I consider you already installed the jdk on your linux server in the directory /usr/local/jdk
Lets test.java be our java application and be sure, now pwd having the /usr/local/jdk path
Now start the execution:
By javac ,compilation of your application be done and class file of name test.class be created(test.class is in the byte code format)
And here is the execution of your application,now you can see the output of your application.
**For More details Please refer http://topukhosting.co.uk/Brew-your-...ation-on-Linux