Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Changing the JAR file contents in my lib folder

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to change some.hbm files (which are just text files) that are inside a JAR file. The JAR file is inside my lib folder inside WEB-INF (it is a library that my application uses).

Would it be possible to make these changes without unpacking and repacking the JAR? I tried to do it with WinZip but WinZip will not save the hbm file with it's same folder structure. When I click save it creates a new file with no folder structure.

Anyone have any suggestions on how I can do this?

Thanks,
Jehan
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jehan,
If you are doing this from the command line, you can use the jar command. It has an update option described online.

Any reason you don't want to unzip the jar?
 
Marshal
Posts: 25682
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If possible, it would be preferable to just regenerate the JAR file after changing the .hbm files in their permanent location. In other words, use your standard process for creating the JAR file.
 
Sheriff
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If these files need to be modified more than once I wouldn't put them in an archive of any kind.
 
What's that smell? Hey, sniff this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic