• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

packaging all packages in an executable jar file

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a problem...please have a look on my project directory
spinner/
spinner/componets/
spinner/components/SpinnerDemo3.class
spinner/components/SpringUtilities.class
spinner/components/CyclingSpinnerModel.class
spinner/others/
spinner/others/check.class
spinner/gui/
spinner/gui/launcher.class
spinner/meta-inf
spinner/meta-inf/manifest.mf

so very obviously i have 3 packages , components, others and gui, now i want to make an executable jar file, so i run a command from spinner directory

jar -cvfm myexe.jar meta-inf/manifest.mf components/*.class gui/*.class others/*.class

so , in this way it worked well, but what i want is , i shdnt be specifying all packages...suppose i have 10 packages, so i will need to write all those in command and that i don't want , so is'nt there any wildcard for this? so that all packages are included in jar file automatically...??? in other words i want each and everything in spinner directory to be packaged in jar file without specifying all ....

hope my question is clear...please help!!
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why dont you run the command from the directory above spinner. E.g. jar -cvf myjar.jar spinner/.

Surely if this is your package structure then you would need the spinner directory included anyway. Anyway if not try jar -cvf myjar.jar ./
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Abhishek,

*/*.class would work , but for each recursive directories , you need to add */*/*.class depending on... If your OS is unix , then there are other options.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic