Help me please.

Reply

Join Date: Mar 2008
Posts: 21
Reputation: theausum has a little shameless behaviour in the past 
Solved Threads: 1
theausum theausum is offline Offline
Newbie Poster

Help me please.

 
0
  #1
Apr 12th, 2008
How do i run a jar file from command prompt??
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Help me please.

 
0
  #2
Apr 12th, 2008
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).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC