• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Running a .jar ?

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded Argo UML from http://argouml.tigris.org
The four files are on my machine in c:\argouml. They are:
argouml-0.8.1a.jar
ocl-argo.jar
nsuml.jar
xml4.jar
...However when I run java -jar argouml-0.8.1a.jar
...using the above file or any of the other three .jar files, I get a "Failed to load Main-Class manifest attribute from (filename)". I've been through this mess once before, a few months ago, and was unsuccessful. Do I need to make a manifest file, or should there already be one embedded in one of the .jar files that I just need to modify ? I'd appreciate any help at all on doing this successfully.
Sincerely, Steve
 
High Plains Drifter
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any executable jar should already have a manifest file that declares the name of the class containing a main method. Is each jar in your CLASSPATH?
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Steven YaegerII
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I didn't change my classpath. Since all four .jars are in the same folder, should I just add that folder to the classpath ? Thanks for shedding some light, I had no idea. I was under the impression that I didn't need to add them to the classpath.
SteveII
Whoops, what a dumb mistake on my part. The site said to run it using java -jar argouml-0.8.1a.jar. Well I checked the file, and it's actually java -jar argouml-0_8_1a.jar. What a breeze! I'm glad I didn't have to modify the manifest, OOPAD was a nightmare I don't care to revisit. Thanks for pointing me in the right direction.
Steve
[This message has been edited by Steven YaegerII (edited February 14, 2001).]
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
how do you set the classpath ??
I am a newbie.
Thanks
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see http://www.javaranch.com/ubb/Forum33/HTML/001304.html
 
Steven YaegerII
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's also a kind've walk-through at: http://www.naviseek.com/book/java2412/jdkhelp1.shtml
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!