I have created classes under package without main method and maintain one util class with main method in different package to run.. Now I am executing all classes with the help of junit.. I have created runnable jar file for my whole project and I want to execute a particular class without main method in cmd with the help of jar file.
Asked
Active
Viewed 49 times
1
-
Can you clarify what you mean by *execute a particular class*? – Adel Khial Sep 07 '16 at 12:44
-
1.I have created runnable jar file for my x project in eclipse. 2.The classes which i have created under packages are not having main method..simply call that classes as test cases 3.I have created one class with main method i..e Junit framework and i am executing that class for all my classes..i.e – Sai Gudapuvalasa Sep 07 '16 at 13:03
-
1.I have created runnable jar file for my x project in eclipse. 2.The classes which i have created under packages are not having main method..simply call that classes as test cases 3.I have created one class with main method i..e Junit framework and i am executing that class for all my classes..i.e 4.I want execute the class in cmd which is not having main method..ex:java -jar xproject.jar myclassname 5.how can i execute above ex command is not working – Sai Gudapuvalasa Sep 07 '16 at 13:10
-
this [SO post] {http://stackoverflow.com/questions/2235276/how-to-run-junit-test-cases-from-the-command-line} has the answer – user3138997 Sep 07 '16 at 16:59