• 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

how to set class path in the MANIFEST.mf file

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created a SWT application.It is reffering 4 another jar files.
I want to make this appliaction an executable jar file.
This the process i followed.

1) copy the class files of the appliaction + the 4 external jar files in a folder.

2)create a file called "mainclass" in side the directory.open this file and
paste this line
Main-Class: CPUGUIClass
Class-Path: jaxen-core.jar jaxen-jdom.jar jdom.jar saxpath.jar

3)run jar cmf mainclass myjar.jar ./

4)it had created the myjar.jar and in the META_INF director MANIFEST.mf file is properly updated.


but while running the jar it is not picking the jar files that i add.

Any suggestions will be of g8 help....
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

but while running the jar it is not picking the jar files that i add.


just a guess: do you have your jars next to your created jar when you open it?
 
Jay Dev
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nops all the jar files are inside the myjar.jar
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jay Dev:
nops all the jar files are inside the myjar.jar


That doesn't work, you cannot have JAR files inside JAR files.
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic