aspose file tools*
The moose likes Beginning Java and the fly likes jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jar files" Watch "jar files" New topic
Author

jar files

shilpa reddy
Greenhorn

Joined: Dec 12, 2000
Posts: 29
hi,
I am trying to run a jar file called abc.jar.
I have 2 versions of jdk on my system - version 1.1.8 and version 1.3.
jdk 1.1.8 is set on my system classpath.I do not want to change the classpath.
The command I use to run the jar is as follows-
java -classpath C:\jdk1.3\jre\lib\rt.jar;C:\jdk1.3\jre\lib\i18n.jar;C:\jdk1.3\lib\dt.jar;C:\jdk1.3\lib\tools.jar --jar c:\abc.jar.
The error message I get is
-jar illegal argument
I think the program is picking up the 1.1.8 version.
Anyone has any suggestions about this.
Thanks ,
Shilpa
Muhammad Ali
Greenhorn

Joined: Dec 04, 2000
Posts: 28
I think you are using two - with the jar keyword. Use -jar instead of --jar.
Muhammad Ali Shah
Karachi, Pakistan.
Charlie Swanson
Ranch Hand

Joined: Jan 29, 2001
Posts: 213
Would the archive parameter work?
Charlie Swanson
Ranch Hand

Joined: Jan 29, 2001
Posts: 213
Sorry, I was wrong about the archive parameter that would be for a jar file in an applet.
 
 
subject: jar files