Wednesday, November 2, 2016

Run different main classes from one project in JAVA

You can use following command to run different classes from one project jar file. Suppose Runner1 and Runner2 are main classes. You want to run both in separately, then you can use the following commands.

java -cp App.jar foo.Runner1
java -cp App.jar foo.Runner2

No comments:

Post a Comment