Hi..
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
Hi..
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
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.
Regards
Karsten Meier
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.
Cheers,
Graham.
Hello
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.
:Ruben