f



Running a jar from a command line in Windows

Hello,

I am having trouble running a jar from a commind line in Windows. The
command is something like:

java -jar main.jar -classpath jar1.jar;jar2.jar etc.

All required jars are in the directory I'm running from and I get a
NoClassDefFoundError on a class that I know is in 1 of my jars.

What am doing wrong?

Thanks

Curt

0
ctabor (3)
6/22/2006 4:46:49 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

2 Replies
576 Views

Similar Articles

[PageSpeed] 12

Curt Tabor wrote:
> I am having trouble running a jar from a commind line in Windows. The
> command is something like:
> 
> java -jar main.jar -classpath jar1.jar;jar2.jar etc.
> 
> All required jars are in the directory I'm running from and I get a
> NoClassDefFoundError on a class that I know is in 1 of my jars.
> 
> What am doing wrong?
You can't use "-classpath" together with "-jar".
See http://groups.google.de/groups?selm=1096038344.126528@igate1.ops.de

-- 
Thomas
0
6/22/2006 5:10:50 PM
Thomas Fritsch wrote:
> Curt Tabor wrote:
>> I am having trouble running a jar from a commind line in Windows. The
>> command is something like:
>>
>> java -jar main.jar -classpath jar1.jar;jar2.jar etc.
>>
>> All required jars are in the directory I'm running from and I get a
>> NoClassDefFoundError on a class that I know is in 1 of my jars.
>>
>> What am doing wrong?
> You can't use "-classpath" together with "-jar".
> See http://groups.google.de/groups?selm=1096038344.126528@igate1.ops.de
> 

He can put a Class-Path: attribute in his main.jar however.

-- 

Knute Johnson
email s/nospam/knute/
0
nospam8071 (1252)
6/23/2006 2:12:17 AM
Reply: