• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Updating a jar

 
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
java.io.IOException: Error in writing existing jar file
at sun.tools.jar.Main.run(Main.java:174)
at sun.tools.jar.Main.main(Main.java:899)

What does this error mean? I have created a jar file and when I type :
jar uf vjmonitor.jar *.properties
I get this error. I was not getting it before and unless I'm losing my sight, I can't see what's different.
Thanks.
Paul
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The jar file is probably still open by some application/process, so you can't update it until it is closed.
 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Billybob. I didn't see any other process using it but when I restarted my machine it worked.
Another jar question :
I run this bat file on an XP machine.
@ECHO OFF
del *.class
javac -classpath .;..\include_files\classes12.zip *.java
del vjmonitor.jar
jar cvf vjmonitor.jar *.class
jar uvf vjmonitor.jar -c ../include_files *.gif
jar umvf manifest.txt vjmonitor.jar
del *.class
copy vjmonitor.jar ..\scripts\vjmonitor.jar
pause
REM monitor

When it come across the highlighted line above, it says there's no such file or directory but proceeds to copy EVERYTHING in the include_files directory into my jar file anyway. There's even a db file copied which I can't find anywhere. Why is this? All I want is to copy in the gif files from another directory with the same parent.
Paul
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul
Try to do CD explicitly by first doing,
CD ..\include_files
<<your jar command that you have highlighted with removal of -c switch>>
CD ..\<<your directory where you were earlier>>
and see if it works.
Regards
Maulin
 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But then it won't find the jar file in the include_files directory - unless it copies that over too.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic