Java - Create a runable JAR file in Eclipse
by
Jeremy Canfield |
Updated: February 09 2023
| Java articles
Let's say you create an AppClient in Eclipse and appClientModule > default package > Main.java contains the following.
public class Main {
public static void main(String[] args) {
System.out.println(args);
}
}
In Eclipse, you can export the project as a Runable JAR file and then place the JAR file on a Linux system, and use the java command to run the JAR file.
~]# java -classpath my.jar Main Hello
Hello
Did you find this article helpful?
If so, consider buying me a coffee over at