• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jar files

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic