Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jar files

 
shilpa reddy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I have already posted this in the beginner forum but then got second thoughts and am reposting the question here.
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
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

I would be tempted to run it like this:
C:\jdk1.3\jre\bin\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
Regds.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic