Results 1 to 5 of 5
  1. #1
    kennyman94 is offline Member
    Join Date
    Feb 2011
    Posts
    24
    Rep Power
    0

    Default Self-extracting JAR

    Hi. my name is kenny and i am working on a program that requires 2 seperate jar files. the first jar is what contains the majority of the program while the second contains various updates mainly subclasses of the Entity class. the Entity class represents interactive objects within the program and i want to be able to update these by simply downloading the most recent jar from a website. but i want the project to come with an original update jar so i thought, why not include both in a another jar file that extracts itself? well, i am trying to do that but i have hit a few snags:

    1) i do not know how to get a file within a jar to be able to reference the containing jar.

    2) I was wondering if instead of extracting the jar, it would be possible to simply keep them in the jar and have it use the jar tool to update itself.

    3) i do not know how to get the jars to reference each other without the locations already being known.

    4) there is no way to set the destination when extracting the jar so i cannot reference that file location.

    5) much much more mostly stemming from my inexperience with jar and zip files.

    can anyone please help me with these problems and give some advice?

  2. #2
    Ray Newman is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

  3. #3
    kennyman94 is offline Member
    Join Date
    Feb 2011
    Posts
    24
    Rep Power
    0

    Default

    no. thank you for the link.

  4. #4
    yellowledbet is offline Senior Member
    Join Date
    Feb 2011
    Location
    Georgia, USA
    Posts
    122
    Rep Power
    0

    Default

    could you add the functionality to download the update within the main program? Maybe a 'get latest update' button. That way the program can store the filename and path when it downloads the updated jar file.

  5. #5
    kennyman94 is offline Member
    Join Date
    Feb 2011
    Posts
    24
    Rep Power
    0

    Default

    i was planning on having the main program attempt to get an update every time it starts up. but, it first needs to have default that comes with the jar which is why i wanted an auto extractor. wither that or i have the program update it's own jar using Runtime.getRuntime().exec("jar uf program.jar update.jar");

Similar Threads

  1. Extracting Double from String?
    By mutagen in forum New To Java
    Replies: 4
    Last Post: 03-20-2011, 04:30 AM
  2. Extracting unicode from char
    By Zoidy in forum New To Java
    Replies: 3
    Last Post: 01-05-2011, 10:06 AM
  3. Extracting a Row/Column from An Array
    By besweeet in forum New To Java
    Replies: 10
    Last Post: 04-18-2010, 07:56 AM
  4. Extracting JAR file
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-08-2008, 09:17 AM
  5. Extracting data from an XML file...
    By techno_brains in forum New To Java
    Replies: 1
    Last Post: 07-15-2007, 05:46 PM

Tags for this Thread

Posting Permissions

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