Runable java files have a single main class. You will need to create an instance of your second class from the Main method of the start-up class.
Make more than one run able file while exporting project eclipse java
-
08-07-2023 - |
سؤال
Hi I have create a selenium test in eclipse java. There are two classes. Now I want to export project as jar and want to run two different classes.
But when I run java -jar myProject.jar
it run only one class that I have select as Launch configuration.
but I want to run another class that in jar.
java -jar myProject.jar testClass2
how to export jar file to achieve this.
المحلول
لا تنتمي إلى StackOverflow