• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

creating jar  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i am trying to create a jar file using 'jar' command. my directory structure is-
c:
root
test1
applet
*.class
if i create a jar for it and extract that jar. it is creating the same path(c:\root\test1\applet) again. but i just want the 'applet' folder to be jared and extract the same in some other directory.
my working directory is 'root'.
please tell me how do i do it. does it require to modify META-INF/MANIFEST.MF. If yes, how it is done?
 
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try
jar cvf myjar.jar applet/*.class from one folder up from applet, or
jar cvf myjar.jar *.class from applet folder depending on your requirements.
In questions like this, it is helpful to include the command that you used that was causing problem.
cheers
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!