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

Similar Messages

  • 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

  • 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-

  • HEAD request to detect updating of files at server

    Hi,
    I'm trying to send a HEAD request from my AIR for Android Application.
    Because, i want download the file only when it has been updated.
    I have tried it with URLLoader and HTTPStatusEvent, but the length of reponseHeaders  is 0.
    public function dwnLoadIconWheel():void
        var urlPub:String = _serverPath + datePath;
        //var urlRequest:URLRequestHeader
        //httpResponseStatus
        var loader:URLLoader = new URLLoader();
        loader.addEventListener(Event.COMPLETE, onPubWheelIconHandler);
        loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorPubWheelIconHandler);
        loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusPubWheelIconHandler);
        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorPubWheelIconHandler);
        var header:URLRequestHeader = new URLRequestHeader("Created", "2008-06-04T22:45:25Z");
        var request:URLRequest = new URLRequest(_xmlServerEpaperUrl + globalPath);
        trace(request.url);
        request.method = URLRequestMethod.HEAD;
        request.requestHeaders.push(header);
        try {
            loader.load(request);
        } catch (error:Error) {
            trace("Unable to load requested document.");
    protected function httpStatusPubWheelIconHandler(event:HTTPStatusEvent):void
        var loader:URLLoader = URLLoader(event.target);
        loader.removeEventListener(Event.COMPLETE, onPubWheelIconHandler);
        loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorPubWheelIconHandler);
        loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusPubWheelIconHandler);
        loader.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorPubWheelIconHandler);
        if (event.responseHeaders.length == 0)
            trace("Header length 0");
        else
            trace("Header received");
    My questions is, if can i get the date of my file from server without download the complete file. Can i do HEAD requests to detect update of files?
    Thanks!

    I found the solution of the problem
    The problem was that i had not used the event correct. I should have used a event of type HTTPStatusEvent.HTTP_RESPONSE_STATUS.
    loader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpStatusPubWheelIconHandler);

  • 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

  • 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);
    }

  • Error in updating jar file in windows

    Hi...
    I am updating a jar file using Runtime.exec() by passing a batch file in it.
    While updating the jar file I am getting error like this:
    java.io.IOException: Error in writing existing jar file
    at sun.tools.jar.Main.run(Main.java:198)
    at sun.tools.jar.Main.main(Main.java:1022)
    The batch file (upgradejar.bat) is like this:
    echo IQuinox NextGen Upgrade Management
    cd shared/upgrade/upgrade/IQfullversion/classes
    jar uf ../../../../../../jars/ng.jar ./qlc/postmaster/PMStartup.class ./qlc/postmaster/wpm/admin/scheduler/others/OthersScheduleServlet.class
    The java code is like this:
    Process p=Runtime.getRuntime.exec( "cmd /C start "+upgradejar.bat);
    if (p.waitFor() != 0) {
    System.err.println("exit value = " +p.exitValue());
    Thanks.

    I am using the jar file in my program. the jar file name is " _ng.jar_ " which is mentioned in the batch file.
    The batch file is here :
    echo IQuinox NextGen Upgrade Management
    cd shared/upgrade/upgrade/IQfullversion/classes
    jar uf ../../../../../../jars/ng.jar ./qlc/postmaster/PMStartup.class ./qlc/postmaster/wpm/admin/scheduler/others/OthersScheduleServlet.class

  • Incremental update jar files

    Hi,
    I want to update a jar file but everything I do ends in
    "Missing version field in response from server when accessing resource".
    Do I need a version.xml? If I need this how should it looks like? Could someone write an example for that mission?
    Regards,
    Patrick
    Thats my project:
    /myapp/myapp.html
    /myapp/myapplication.jar
    /myapp/myapplication.jnlp
    /myapp/myapplication.jpg
    /myapp/meta-inf/Manifest.mf
    /myapp/web-inf/web.xml
    /myapp/web-inf/lib/jaxp.jar
    /myapp/web-inf/lib/jnlp-servlet.jar
    /myapp/web-inf/lib/parser.jar
    web.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
         <servlet>
                   <servlet-name>JnlpDownloadServlet</servlet-name>
                   <servlet-class>com.sun.javaws.servlet.JnlpDownloadServlet</servlet-class>
              <init-param>
                   <param-name>loglevel</param-name>
                   <param-value>DEBUG</param-value>
              </init-param>
              <init-param>
                   <param-name>logPath</param-name>
                   <param-value>/logs/jnlpdownloadservlet.log</param-value>
              </init-param>
              <mime-mapping>
                   <extension>
                        jnlp
                   </extension>
                   <mime-type>
                        application/x-java-jnlp-file               
                   </mime-type>
              </mime-mapping>
              <mime-mapping>
                   <extension>
                        jardiff
                   </extension>
                   <mime-type>
                        application/x-java-archive-diff               
                   </mime-type>
              </mime-mapping>
         </servlet>
    </web-app>
    jnlp:
    <jnlp spec="1.0+" codebase="http://asgard/myapp" href="myapplication.jnlp" version="2.0">
    <information>
    <title>MyApplication</title>
    <vendor>Patrick Scholze</vendor>
    <homepage href="../myapp.html" />
    <description kind="">MyApplication</description>
    <description kind="short">myapp</description>
    <icon kind="default" href="myapplication.jpg" />
    </information>
    <resources>
    <j2se version="1.2+" />
    <jar href="myapplication.jar" main="true" download="eager" version="2.0"/>
    </resources>
    <application-desc main-class="Start">
    </application-desc>
    <security>
    <all-permissions />
    </security>
    </jnlp>

    Now there are no error messages but JWS downloads the
    complete jar file.If you specify "eager", Web Start is told to load that jar immeadiately.
    What exactly do you have in mind with that jar?
    Lazy download (thus at a latter time), or the download of a specific version of the jar or differential download?
    Regards,
    Marc

  • How to Update Jar Files

    Can u tell me how to update an JAR file .
    I have a jar file ,I would like to add a class in that jar.
    I am able to add it but it goes
    into the root folder where as i want it go in one of the sub folder.
    Eg
    TEST.JAR
    The structure is
    Server\a.class
    Server\folder1\b.class
    Server\folder2\c.class
    Now when i add the class it goes to
    Server\a.class
    Server\folder1\b.class
    Server\folder2\c.class
    my.class
    where as i want it to go in
    Server\folder1\my.class

    Show the code you use to add it to the JAR, and we will attempt to fix it. Don't forget to put it around [code]  tags

  • Lazy downloading broken for updated jar-files?

    Hello,
    Using webstart-6.0 + jar-index + download="lazy" works great - jar files are downloaded on demand when they are really needed.
    However when updating all jar-files, the files that have been downloaded lazily and cached before are downloaded again before the application can be launched, not only on demand.
    Is this the intended behaviour, and is there any way to let webstart lazily download updates, just when the jar-files are needed?
    Thank you in advance, lg Clemens

    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-

  • Update jar file by removing existing files

    hello,
    is there a way to update a jar file by removing indicated files within the jar file ?
    I saw that it is possible to update a jar file by adding files to it: jar uf jar-file input-file(s)
    I want to avoid:
    1)extracting the file
    2) remove indicated files
    3) compress again.
    thank you !

    >
    I want to avoid:
    1)extracting the file
    2) remove indicated files
    3) compress again.>If you don't want to do it, make Ant do it, and be happy (get on with your life, do fun things etc.).

  • Updating JAR Files

    We're puzzling through a problem with our JAR files and
    unfortunately I'm having no luck finding anything in the forums
    about it. The question is this: If you update the JAR files on your
    Cold Fusion Server, do you have the restart the server in order for
    the updates to take affect? Any help would be greatly appreciated.
    Mike

    Gomba316 wrote:
    > If you update the JAR files on your Cold Fusion Server,
    do you have the restart
    > the server in order for the updates to take affect? Any
    help would be greatly
    > appreciated.
    depends on the JAR. i'd suggest giving javaLoader CFC a look:
    http://www.compoundtheory.com/?action=javaloader.index
    you can make use of java
    JARs/classes way more easily that working via the classpath
    (even if you have
    full control of the classpath, its very useful if you need to
    swap around
    versions of stuff).

  • Updated JAR files problem

    Hey guys, I just updated my jar files from myfaces-api.jar to myfaces-api1.1.5.jar or something like that. Then all of a sudden my submit function does not work. It keeps having a javascript error...
    form has no properties
    oamSetHiddenInput("linkDummyForm", "autoScroll", "0,0")adminHome.jsf (line 91)
    oamSubmitForm("linkDummyForm", "adminMenu:_idJsp1", undefined, undefined)adminHome.jsf (line 128)
    onclick(click clientX=0, clientY=0)
    ack! i have no idea what im supposed to do! thanks in advance!
    -Arch_Bytes

    The MyFaces user mailing list might get you better results than this forum.

Maybe you are looking for