Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2011
    Rep Power

    Default Modifying the contents of the Jar

    Hello all,
    Right, now I'm sure there are all sorts of faults with doing this, but call it curiosity.
    The set-up is this; a program that requires very simple persistence (think a handful of numbers). What I'm thinking is this; rather than have a file at a user specified location (and them having to load it) is it possible to store the file inside the jar in one place, then each time the program loads to access and then modify this file? I'm guessing even if this is possible, it wouldn't be done the same as writing/reading a regular file?
    Is this possible?
    If so, how on earth would you go about doing it?
    And if it is possible, why shouldn't you do it (as in is it just silly, problem causing etc.)?
    Thanks for your time!

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power

    Default Re: Modifying the contents of the Jar

    A .jar file basically is a .zip file and even those zip utilities have to remove the old entry, add a new zip entry and basically have to create an entirely new .zip file. If you want to do that, it can be done, otherwise it would be easier to create a separate file copy of the entry and modify the copy.

    kind regards,

    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. modifying the display of a website
    By adhoc334 in forum Networking
    Replies: 11
    Last Post: 05-09-2011, 06:17 AM
  2. Modifying this app.
    By seaisle68 in forum Java Applets
    Replies: 5
    Last Post: 04-07-2011, 03:12 PM
  3. Modifying output
    By sqlsql0 in forum New To Java
    Replies: 1
    Last Post: 02-28-2011, 12:33 PM
  4. One Jspinner modifying the value of the other
    By cotarelo in forum AWT / Swing
    Replies: 1
    Last Post: 06-11-2010, 02:48 PM
  5. Replies: 1
    Last Post: 02-23-2010, 10:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts