Home > Default > Updating jar from a java program

Updating jar from a java program

November 30Hits:0
Advertisement
I have a text file in a jar. The contents of the file change during program execution and so, I need to be able to update the jar to reflect the changed contents. How do I do this from inside my program?
Ravi

Answers

There is no way to "update" a jar file. If you want to do that, you must create an entirely new jar file containing the modified data. So, you should only store permanent data in a jar file.

Read other 2 answers

Tags:

Related Articles

  • Updating jar from a java programNovember 30

    I have a text file in a jar. The contents of the file change during program execution and so, I need to be able to update the jar to reflect the changed contents. How do I do this from inside my program? RaviThere is no way to "update" a jar fil

  • Writing into a jar file through Java programNovember 30

    Is there a way to get a file from a jar (for ex. a properties file) make changes to it on the fly and write the same file back to the jar through a Java program?I cannnot give u exact code as i am bit busy..but i am giving close to exact below is cod

  • Executing Jar Application using Java ProgramsNovember 30

    Hello there, How can I run a java application using java programs. Desc: public class someapp {    public static void main(String[] ext) {        // How can I execute a jar application from here through java code }You could use java.lang.Runtime.exec

  • Running a .jar with a java program on unixOctober 11

    I am trying to run a jar file with this java code but when i run it, it comes up with built successfully but the file doesn't run. ps- I use a unix os public class Main { public static void main(String args[]) throws IOException, InterruptedException

  • Is JAR signing by Java program possible?November 30

    I need to create (i.e. fix) JARs and I'd like to apply signatures to them by internal means, that is without the use of jarsigner.exe. I have a keystore file I want to use for the signature. Which means does the JDK's API provide to implement this? I

  • Running executable jar from within a java programNovember 30

    Is there a way to launch an executable jar in a java program? I tried wrapping the jar in an exe and calling it using Runtime exec() and though this approach works it does only for windows. I want it to work for unix/linux too.jaki wrote: Yes, but it

  • Updation in zip file through java programNovember 30

    Hi, Can any buddy help me updating zip file using java programs. I dont want to delete the zip file but I want to update single file in the zip. Any clue ? Regards, AshishI mean I want to update a zip file using java program. Suppose there are 4 file

  • Java Programming Book:November 30

    Does anyone know if there is/will be an update to the <u>Java Programming with the SAP Web Application Server</u> book anytime soon to cover the Composite Environment?Hi Richard, Good news, the book is in work. Regards, KatarzynaRead other 2 a

  • Java program not updating in correct sequence in appletOctober 11

    Greetings, I have a java program with interactive graphic components. After completely writing the program, I create two shells ( or handle): an application shell with JFrame and an applet shell with JApplet. The application version of the program wo

  • Using a UNIX shell script to run a Java program (packaged in a JAR)October 11

    Hi, I have an application (very small) that connects to our database. It needs to run in our UNIX environment so I've been working on a shell script to set the class path and call the JAR file. I'm not making a lot of progress on my own. I've attache

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.630 s.