Discussion Board

Results 1 to 4 of 4

Thread: Update Jar

  1. #1
    Registered User
    Join Date
    Feb 2009

    Exclamation Update Jar


    1. i want to update files inside my jar file when user wish to download update from server..

    2. How to read manifest file of jar

    How to do it

  2. #2
    Regular Contributor
    Join Date
    Mar 2005
    Hamburg, Germany

    Re: Update Jar

    1. you can't update files inside your jar file.
    The jar file is read-only for your midlet.
    Probably you want to store your information into the "Record Store" (RMS).

    2. Have a look at getAppProperty(key) in class Midlet. you can look up the value for a key in your manifest or/and jad file.


    Karsten Meier

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Cheshire, UK

    Re: Update Jar

    Quote Originally Posted by mal2388 View Post
    i want to update files inside my jar file when user wish to download update from server..
    If you wish to install an updated version, go to the phone's application manager, find the application, select (depending on device), Options, then Update Version. The application manager automatically connects back to the URL from which the application's JAD was originally downloaded. The new JAD is compared with the original, and if the the new one has a later version number, the user is given the opportunity to download the JAR also. The new MIDlet-Name and MIDlet-Vendor must be identical to the original.

    When a new JAR is installed through the application manager's update facility, data in RMS are not deleted. The newly installed JAR will have access to the information from the previously installed version.

    This is the only way you can update the code (.class files). You can only update the entire JAR, not individual files within the JAR.

    If you just want to download data updates (no code), and they are frequent, you are probably better to follow Karsten's advice and download the data into RMS.


  4. #4
    Nokia Developer Expert
    Join Date
    May 2007
    Mexico D.F

    Re: Update Jar


    You can use the method platformRequest(url) of your MIDLet

    If the URL specified refers to a MIDlet suite (either an Application Descriptor or a JAR file), the application
    handling the request MUST interpret it as a request to install the named package. In this case, the platform's
    normal MIDlet suite installation process SHOULD be used, and the user MUST be allowed to control the
    process (including cancelling the download and/or installation). If the MIDlet suite being installed is an
    update of the currently running MIDlet suite, the platform MUST first stop the currently running MIDlet
    suite before performing the update. On some platforms, the currently running MIDlet suite MAY need to be
    stopped before any installations can occur.

Similar Threads

  1. Extracting contents of a jar file onto disk
    By surenc in forum Mobile Java General
    Replies: 2
    Last Post: 2009-03-10, 13:11
  2. Jar update
    By RamiX in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2008-05-15, 00:33
  3. Extracting/Re-Packaging a JAR file
    By thatch8 in forum Mobile Java General
    Replies: 0
    Last Post: 2007-06-12, 13:04
  4. Update jar file possilble?
    By skeptic9 in forum Mobile Java General
    Replies: 4
    Last Post: 2007-03-01, 08:45
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

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