Tuesday, November 22, 2011

Tips: 12 How to run java programs in Linux ?


Java is an interpreted language. Usualy Java is found on the Web, in small programs called applets. But many Java applications exist. They are like applets, but require a Java Virtual Machine to run on your system. Netscape Communicator and any Java-enabled browser can run Java applets, but what if you want to run Java programs?

Java programs are files ending with .class and must be run in a JVM. The Java Development Kit comes with a JVM. What you need is the Linux port of the JDK. Once installed, you can run any Java application using the line:

java Program

Where java is the JVM, from the JDK package, and Program is the class found inside the Program.class file.

Note that you do not have to specify the .class part of the file to run it.

No comments:

Post a Comment