DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   Help me please. (http://www.daniweb.com/forums/thread118791.html)

theausum Apr 12th, 2008 2:21 pm
Help me please.
 
How do i run a jar file from command prompt??

jwenting Apr 12th, 2008 2:56 pm
Re: Help me please.
 
IF it's an executable jar, "java -jar <jarfile.jar>" where <jarfile.jar> is the filename of the jarfile (fully qualified if not on the current system path).

If it's not an executable jar, you can't obviously run it.
You can however run a class inside it (if it has a main method) using "java -cp <jarfile.jar> <classname>" where classname is the fully qualified classname of the class to run (so including the full package name).


All times are GMT -4. The time now is 1:55 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC