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

    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!
    ~Longeye~

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,762
    Blog Entries
    7
    Rep Power
    21

    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,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. modifying the display of a website
    By adhoc334 in forum Networking
    Replies: 11
    Last Post: 05-09-2011, 07:17 AM
  2. Modifying this app.
    By seaisle68 in forum Java Applets
    Replies: 5
    Last Post: 04-07-2011, 04: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, 03: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
  •