Updating .jar/.jad file..

Dear All,
It would be a pleasure if anyone of u can come up with the hidden technology behind software update. Actually I will have a .jar and .jad file on my mobile and it will check the server for the update version of the application and if it finds update then it will have to replace the old .jar/.jad with the new version from server.
as far as I know windows updates or something like that is done by replacing some old .dll file with some new .dll file. But for java its a whole .jar package. and I have to replace some classes. how should I manage this one in java.
anyone with any suggestions will be highly appreciated. thanx in advance.
zakir

I didn't try it but i think automatic update can be done. You can do it by using platformRequest("http://your_jad_url") method in MIDP 2.0
Ran
Edited by: Ran_Cu on Feb 28, 2008 6:40 AM

Similar Messages

  • How to hide the jar/jad files

    Hi,
    When we give the url to jar/jad files to download basically we are giving away our code. Anybody can point their browser to the given url and download the jar file to their desktop, decompile the code and voila they have everything that we worked on for months.
    Which is the best obfuscator available on the market to hide the code ? And also how can we restrict them to download via phone only and not be able to access jar file via the browser i.e even if I know the url I should not get the download window to get the jar file on my desktop ?
    Thanks.

    Which is the best obfuscator available on the market
    to hide the code ? You migth want to try progaurd: http://proguard.sourceforge.net/ Works very well.
    And also how can we restrict them
    to download via phone only and not be able to access
    jar file via the browser i.e even if I know the url
    I should not get the download window to get the jar
    file on my desktop ?That is almost impossible, since you can never know if a phone or something else is talking to your webserver. Phones signatures can easyly be faked.

  • Upload and Download a JAR/JAD file to/from a Web Server

    How do I upload the JAR and JAD file to the Web Server?
    And once deployed on the Web Server,how can I down load this.
    I have written a small MIDlet.
    I would like to upload this to my Web Server(I have Apache running),and then
    I would like to download this and test this,
    Please can any suggest.I am testing this on Siemens m50.
    Ajay

    You should configure your web server to send the correct mime types
    for .jad and .jar extensions
    Ivan

  • How to install .jar/.jad Files without MS Windows?

    Hello,
    it would have been nice if Nokia would also think of non-MS-Windows users....
    I have downloaded a software package from nokia.com, it consists of two files: a *.jar file and a *.jad file, How can i install them on my phone without Nokia Suite? I copied the files now to my microSD card in the phone. Can I just select the files? Does the phone detect these are programs that can be installed?
    I use a 3600 slide, thanx
    Malte
    Okay, I have now copied the two files to the phone and tried to open it,the phone says "incompatible program". But i correctly selected 3600 as my phone when I downloaded it, i talk about the "Download!" tool i want to install.
    Message Edited by pinguin74 on 03-Apr-2009 10:23 PM

    no worries, Radical24 and I are happy to help. i don't know exactly how that works, or the techincalities behind it, i know that even if you download other applications such as Windows Live or even games, then they install without needing to bypass through a PC. must be complicated though to research to do on your own, i know its too much trouble for me, so i just use PC suite to do it. 
    If you found this or someone's comments helpful or like what that person has to say, please give some Kudos to their post!
    Message Edited by adrianhughes on 05-Apr-2009 11:16 AM

  • Problem with creatin jar & jad files(wtk 1.4.2)

    Hi,
    Im devlopping an application & im facing big problem:
    The application is runing normaly when i build & test it on wtk1.4.2,but when
    i create package (project-->create package) and go to test the jad im getting
    a black screen instead of my application.
    Can any one help.
    Thanks.

    i face the same problem!
    help me too!
    The application is runing normaly when i build & test it on wtk2.2 ,
    when i create package (project-->create package) and go to test the jad , the first screen can be display normally, but the second screen can not be display!
    my jar size :187K, is it too big?(it is a game.)

  • Error while downloading Jar/Jad by air

    Hi All,
    I am using netbeans as my IDE while compiling I m getting Jar and Jad file only I have uploaded both the files to VPN server now I want to download Jar/Jad file yesterday it downloaded fine on worked well on Blackberry bold device but from today it started creating a problem & display error messages as *"in jad file descriptor missing for midlet 1"*
    So while downloading it says download fail
    My Jad file information is given below
    MIDlet-1: myproject, , myproject
    MIDlet-Jar-Size: 6335
    MIDlet-Jar-URL: myproject.jar
    MIDlet-Name: myproject
    MIDlet-Vendor: vendor
    MIDlet-Version: 2.1
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.0
    Please tell me it works fine on simulator but not on my device

    Try writing the complete url for your jar file location and make sure the jar size is exactly the same.
    Ex.:
    MIDlet-1: myproject, , myproject
    MIDlet-Jar-Size: *6335*
    MIDlet-Jar-URL: http://www.myserver.com/ota/myproject.jar
    MIDlet-Name: myproject
    MIDlet-Vendor: vendor
    MIDlet-Version: 2.1
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.0

  • Error  While Opening an Updated JAR file

    Frnds,
    I have some problem with a JAR file update. Seek ur help in this regard.Here goes my problem.
    I need to update a jar file ( need to replace a single .class file with a new one ). I updated the JAR file using ' jar uf ' command and it was successfull.. I removed the old JAR file and replaced it with the updated JAR file. But when i tried to invoke the JAR application using Java we start iam unable to open the applicaiton. But when i replace this upadted JAR file with the old JAR file ( using the backup) the application loads correctly.
    The application is hposted in Apcahe web server. Is a server restart required after deploying the updated JAR file or is this porblem due to some other reasons.
    Thanks in advance.
    Regards,
    Bala.

    It appears that the New Report .vi only accepts the .xlt template format and not .xltx as one would commonly expect. I am currently working to determine for sure that this is the case, but it does run (mostly) properly on my end if you make that change.
    When I say mostly, I mean there are a couple other minor issues with your code. First the first frame of your sequence structure is really accomplishing anything. If your intent is to open a reference to the excel template, there is no need because the New Report .vi does it automatically.
    Second, you will need a file path of some sort wired in to your Save Report to File .vi or else you will get a different error message after fixing the .xlt issue. I am currently researching whether this should be marked as a required terminal instead of recommended so that it not being wired would result in a broken run arrow rather than an error.
    Let me know if these suggestions resolve your issue, or if I can provide further input on what you are doing in your first frame. I will touch base again once I determine whether these are expected behaviors or bugs.
    Christopher S. | Applications Engineer
    Certified LabVIEW Developer
    "If in doubt... flat out." - Colin McRae

  • Updating a specific file into a .jar file

    Hi,
    I have got a .jar file, if I want to update the specific file org/abc/try.class, with a new try.class, what command should I use?
    thanks a lot.

    Something like that, but remember you have to rebuild the entire jar file from scratch. You can't just update one file in it.

  • Programatic way of updating jar files

    Is there a programmatic way of updating jar files (efficiently)? What I am looking for is an equivalent of jar -u option available in JDK 1.3.
    The only way I have right now is to create a new jar file, add the new files into this file and then add the entries from the original.
    Spawning jar -u ... is also not a desired option.
    Thanks in advance,
    Bharat

    What am looking for is a programmatic way from my Java program to do so without calling jar -u ...
    The method I am looking for is using the java.util.zip/java.util.jar packages to acheive the same result as jar -u...

  • Updating jar files in ALSB 2.6

    How do we update jar files imported in ALSB projects? Once they have references to them it does not seem feasible to replace them with new version?

    I may not have been clear in my initial post. My questions pertains to jar files that provide POJOs for java callouts. Above link discusses updating project jar with a new version. To create new version of project jar, I think i would first need to update the jar that provides POJOs. Please correct me if there is another way to do it.

  • Updated JAR files in j2ee/home/lib

    We are developing and deploying j2ee applications to a 9.0.2.3 9iAS server. We have a framework.jar file that we have a number of applications in two OC4J instances (home and portal) that need to use this jar file. As a result, we place the jar file in the j2ee/home/lib directory since this could be seen by all applications. My question comes in when we try and update this jar file. We seem to experience problems when moving a new framework.jar file into the directory. We mainly notice this issue in our EM Website. We begin to get the following error in the EM Website after we move an updated jar file into the directory:
    Servlet error: Renderer failed: java.lang.InternalError: jzentry == 0
    I've seen this error before and it seems to link back to a problem with jar files. If I remove the new jar file the error disappears. We are eventually able to get the jar file in, but only after restarting the whole mid-tier. Is this normal? Should we have to restart the server everytime we update the jar file? If so, what would be the best way to implement the new jar files? Stop mid-tier, move new file in and restart??
    Would you recommend a different location for this jar file?? Our biggest concern is that we only want to deploy this jar file one time and have all applications that need it find it. Thanks in advance for any input you might have.
    Beth

    Libraries loaded from the j2ee/home/lib directory are opened and loaded at the J2EE container level. So they are accessed from the very start of the server, to the point where it is stopped.
    Therefore if you modify a class library which has already been loaded, you may run into file locking related issues (which will be OS dependent, Windows for example probably won't even let you overwrite the file) so that is what you are likely to be seeing.
    JAR files loaded at the J2EE container level aren't really suitable for dynamic updating -- the classes can be referenced in a multitude of other classloaders.
    As you have seen, replacing a J2EE container level class file, then a restart will be required along the lines of what you have written.
    Stop mid-tier, move new file in and restart?? cheers
    -steve-

  • How to make the browser reload an updated jar-file?

    Hi there,
    Previosly when running applets using MSIE, all needed to reload an updated jar-file was pressing CTRL+F5
    Currently I've been assigned to re-develop some of my old applets and now I realize that the old CTRL+F5 won't do the trick any more since the old jar file is still in the cache and the new jar file is not loaded.
    I learned the hard way that all I can do is to manually clear the cache of the browser (Tools | Options | Delete files) and restart the browser and after that the new jar file is correctly loaded.
    Cache settings of the browser is set to "Reload on every visit to the page"
    Currently running Win2k, MSIE 6.0 SP1 and MSJVM 3809 but the problem also exists on Win2k, MSIE 6.0 and MSJVM 3186.
    Isn't there any easier way to do this?
    Currently I don't even mind not caching the jar-files at all as long as I don't get my development work trashed by having to restart the browser after every new build...
    Why has the old CTRL+F5 behaviour been changed?
    BR
    /Jonas

    I have been closing IE and reopening it for 7 months now. I don't of any other way to reload an applet.
    Jason

  • Detecting updated JAR files

    Hi,
    I have a problem that shows up somewhat infrequently. Once in a while, when I start my offline-allowed application, newer versions the application (e.g. updated JAR files) are not automatically downloaded. If I close the application and restart, the newer JAR files are properly downloaded. Has anyone else seen this problem?
    A perhaps related question I have is how long does web start wait for the head request to come back when it checks for newer JAR files?
    Thanks,
    Joe

    this post may help
    http://forum.java.sun.com/thread.jsp?forum=38&thread=452567

  • Update jar file with modified class files

    hi all,
    I'm developing a jar utility for updating a jar file with modified class files as of now i have reached a point where in i can browse files and set it to required location
    i.e i have developed a swings GUI application using JfileChooser and browse the files ..now my requirement is to update the jar files with modified class file
    GUI looks like below
    ....enter the modified class file ----> d:\c.class
    ....enter the jar file path ---> d:\a.jar
                                                          update button now i have the requirement as
    1> when i click on the update button ,my jar file (a.jar) should get updated with the latest class file (c.class)
    can u help me to achieve this requirement.???
    im stuck with this,,,if u can provide me wit the code for updating jar file with latest class file...it will really be helpful
    if u can help me with the code on click on update button it will be really helpful
    Thanks and expecting a faster response from u all java experts....

    Please find my query in bolds...i have written the partial code now,i need some help now
    hope u guys can help me out...
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.File;
    public class FileExplorer extends JDialog implements ActionListener
         JTextField txtLocation_class;
         JButton btnBrowse_class;
         JLabel label_class;
         JTextField txtLocation_jar;
         JButton btnBrowse_jar;
         JLabel label_jar;
         JButton updatebutton;
         public FileExplorer()
                   setSize(600,300);
                   //for class files
                   label_class = new JLabel("Please select Modified Class File");
                   txtLocation_class= new JTextField(20);
                   btnBrowse_class = new JButton("Browse");
                   btnBrowse_class.addActionListener(this);
                   //for jar files               
                   label_jar = new JLabel(" Please select the Jar file");
                   txtLocation_jar= new JTextField(20);
                   btnBrowse_jar = new JButton("Browse");
                   btnBrowse_jar.addActionListener(this);
                   ActionListener updateListener = new ActionListener(){
                    public void actionPerformed(ActionEvent ae){
                     if(ae.getActionCommand().equalsIgnoreCase("Update")){               
                      System.out.println("ae.getActionCommand() :: "+ae.getActionCommand());
                      System.out.println("Update Button is pressed");               
                    *//Query :how do i access FilePath and FilePath1 here which*
    *                // has been set in public void actionPerformed(ActionEvent ae)*
    *                //method below*
    *                // FilePath  ---??*
    *                // FilePath1  ---??*
    *                // how do i access the above 2 parameters*
    *                //Query :on click of update button i have to pass*
    *                //two parameters FilePath and FilePath1 to*
    *                //perform some functionality. please help me*
    *                //to achieve this..how do i access Filepath and Filepath1*
    *                //here which has been set below.*
                     } // end of if               
                   } // end of actionPerformed
                };// end of ActionListener
                  updatebutton = new JButton("Update");
                  updatebutton.addActionListener(updateListener);
                   //adding to the panel               
                   JPanel pnl = new JPanel();
                   pnl.add(label_class);
                   pnl.add(txtLocation_class);
                   pnl.add(btnBrowse_class);
                   pnl.add(label_jar);
                   pnl.add(txtLocation_jar);
                   pnl.add(btnBrowse_jar);
                  pnl.add(updatebutton);
                   getContentPane().add(pnl);                         
         public void actionPerformed(ActionEvent ae)
              Object obj=ae.getSource();
              if(obj==btnBrowse_class)
                   final JFileChooser fcstudent = new JFileChooser();
                   int rtrnval = fcstudent.showOpenDialog(this);
                   if(rtrnval==JFileChooser.APPROVE_OPTION)
                        try
                             File file=fcstudent.getSelectedFile();                         
                             String path = file.getPath();
                             System.out.println("This is Path:"+path);
                             txtLocation_class.setText(""+path);
                             String FilePath=txtLocation_class.getText();
                             System.out.println("FilePath is ::"+FilePath);                                        
                        catch(Exception ex)               
                             ex.printStackTrace();
              }else if(obj==btnBrowse_jar){
                             final JFileChooser fcstudent = new JFileChooser();
                             int rtrnval = fcstudent.showOpenDialog(this);
                             if(rtrnval==JFileChooser.APPROVE_OPTION)
                                  try
                                       File file=fcstudent.getSelectedFile();                         
                                       String path1 = file.getPath();
                                       System.out.println("This is Path:"+path1);
                                       txtLocation_jar.setText(""+path1);
                                       String FilePath1=txtLocation_jar.getText();
                                       System.out.println("FilePath is ::"+FilePath1);                                        
                                  catch(Exception ex)               
                                       ex.printStackTrace();
         public static void main(String arg[]){
                   FileExplorer Exm= new FileExplorer();
                   Exm.setVisible(true);
    }

  • Updating an XML file inside the executable JAR.

    Hello all!
    I would like to askk how can i update an XML file that is packaged inside my jar file?
    For intstance:
    I have a Java Application in NetBeans
    Inside a package i have constructed a custom .xml file.
    I can read from this file using
    .....getClass().getResourceAsStream("/.../file.xml")and after that using XPath for querying and works fine.
    I want to update an entry in my xml file so the jar contains now the newly updated file.
    Thanks everyone who spends hit time to read this. Hope someone can help me.

    Please don't cross-post:
    http://forums.sun.com/thread.jspa?threadID=5342194

Maybe you are looking for