Creating Executable Program in Java
Executable software can be created using JAR(Java Archive) utility. Once you create jar file of the program it can run on any machine having JRE(Java Runtime Environment ) installed.
JAR file should contain the .class files and resource such images, audio or any other files required. Including only .class files makes the code private. It can also include .java files, the source code of the program. Following are the commands to be run at Command Prompt or Terminal in Linux.
Step 1: Compiling the Java Programs
First compile all the Java programs of an application.