• 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

Issue while packaging the class in the module

 
Ranch Hand
Posts: 113
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am trying to create jar file out of the module straight out of the Jeanne/Scott book page-461. But I am getting error. Please find the attached screenshot. What I am doing wrong?



issue1.PNG
[Thumbnail for issue1.PNG]
 
Greenhorn
Posts: 13
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Souvik,

I think it is because you are running the command from within the mods/ directory and your output jar file is mods/zoo.animal.feeding.jar (this is a relative path). Try specifyng jar -cvf zoo.animal.feeding.jar and it should work.

Nic  
 
Souvik Dasgupta
Ranch Hand
Posts: 113
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks Nic, that worked. But now i am stuck with the page-464 problem and the module is not found. The example is exactly the same as book.

issue2.PNG
[Thumbnail for issue2.PNG]
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Once again, why are you inside the mods directory?
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jar -cfe jarDirectory/jarfileName.jar -C binDirectory/moduleName  .

c  = create
f  = fileName
e = main Class path
-C = where you create a jar file (Directory).
. = current Directory
reply
    Bookmark Topic Watch Topic
  • New Topic