Update Jar

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 read manifest file of jarUse following line to get the inputstream of the manifest file.
InputStream in = getClass().getResourceAsStream("/META-INF/MANIFEST.MF");
You can then read the inputstream in the usual way.
i want to update files inside my jar file when user wish to download update from server..You can't possibly update files inside jar. You can update whole application however.

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

  • JWS Hanging when updated jar available

    Hi,
    When I make an updated JAR file available, it gets downloaded and verified correctly (it's signed), but then nothing. The progress dialogue simply says that scanning has reached 100%. There have been a couple of threads along these lines, but nothing that seems to jump out as a solution. Here are the details:
    I have an application that I am deploying, as described by this JNLP file:
    <?xml version="1.0" encoding="ANSI"?>
    <jnlp spec="1.0+" href="ourapp_main.jnlp" codebase="http://myMachineName/ourapp">
      <information>
        <title>Application Titlet</title>
        <vendor>Meridian Informatics</vendor>
        <homepage href="http://meridianinfo.com" />
        <description>Our app</description>
        <description kind="one-line">Our app</description>
        <description kind="tooltip">Our app</description>
        <description kind="short">Our app</description>
        <icon href="http://myMachineName/ourapp/images/icon.gif" version="" width="" height="" depth="" size="" />
        <offline-allowed />
      </information>
      <resources>
        <j2se version="1.3+" />
        <jar href="ourapp_main.jar" main="false" download="eager" />
        <nativelib href="win32printerdll.jar" download="eager" />
        <extension href="activation.jnlp" name="activation" />
        <extension href="borland.jnlp" name="borland" />
        <extension href="collections.jnlp" name="collections" />
        <extension href="design_pro.jnlp" name="design_pro" />
        <extension href="ourapp.jnlp" name="ourapp" />
        <extension href="ibmftp.jnlp" name="ibmftp" />
        <extension href="framework.jnlp" name="framework" />
        <extension href="mail.jnlp" name="mail" />
        <extension href="xreport_pro.jnlp" name="xreport_pro" />
        <extension href="xtools.jnlp" name="xtools" />
      </resources>
      <security>
        <all-permissions />
      </security>
      <application-desc main-class="com.meridianinfo.ourapp.twotier.MainApp" />
    </jnlp>And here's a JNLP file for one of the extensions (all extension JNLP files were copied from an original and the relevant names changed):
    <?xml version="1.0" encoding="ANSI"?>
    <!--  created on Tue Aug 28 13:18:27 GMT+11:00 2001  --><!--  created by fitzpatk on Windows 2000  --><!--  1.3.0  -->
    <jnlp codebase="http://myMachineName/ourapp" spec="1.0+" href="ibmftp.jnlp">
      <information>
        <title>Desktop for Ecommdirect</title>
        <vendor>Meridian Informatics</vendor>
        <homepage href="http://meridianinfo.com" />
        <offline-allowed />
        <icon kind="default" href="http://myMachineName/ourapp/images/icon.gif" />
      </information>
      <resources>
        <jar href="ibmftp.jar" main="false" download="eager" />
      </resources>
      <component-desc />
      <security>
        <all-permissions />
      </security>
    </jnlp>In versions of JWS prior to the latest, all the JNLP files would be downloaded, but then processing would stop (i.e. no jar files would be downloaded).
    When using the latest version of JWS, launching an application for the first time works fine - everything gets downloaded correctly, installed, and the application launched. As long as there are no updates, this continues to work.
    If I update one of the jar files, it is downloaded and scanned, but the application never starts. The dialogue stating that scanning has reached 100% remains on screen. There is nothing untoward in the log file or in the console. If I hit Cancel at this point, and try to launch the application again, everthing works (of course, there is nolonger an update to download at this point).
    If I update two or more jar files (but not all!), I have to repeat the previous procedure for every updated jar file, before the application will launch.
    If I update all of the jar files, it works as expected - everything is downloaded and installed and the application is started.
    BTW: I am "updating" the jar files by resigning them (using jarsigner).
    I am using Win NT and Win 2K, JRE's 1.3.1 and 1.3.0_01.
    This looks like a bug to me, but before I log it as such, I'd appreciate hearing your thoughts/comments. Maybe there is something missing from my JNLP files, or some combination of software that is likely to cause this?
    All comments appreciated.
    Kieran

    There have been a couple
    of threads along these lines, but nothing that seems
    to jump out as a solution.Yep.
    My strategy is brute force, born out of cluelessness, and is either
    1. nuke .javaws/cache and retry
    or if that doesn't help get really angry and
    2. nuke the whole Java Web Start installation directory (and please make sure that not a single .dll survived eg due to IE having some instance slurped in), reinstall Web Start and retry
    and if that does not help we go into scapegoat location mode and do
    3. It must be the bloody JRE, thus try again with 1.3.1, 1.3.1_01, 1.4 and whatever JRE you get your hands on, try also alternative vendors like IBM or Blackdown
    the adventureous now might do
    4. sign that incomprehensible license agreement, download the Web Start sources and fix the problem yourself
    but if you have not enough time or skills on your hand then finally give up and try
    5. It is a Web Start bug. Let's submit it as bug and wait for 1.1
    Not too subtle, eh? :-)
    But there are reasons for this.
    installation of new versions might end in a mess
    No. 2 is motivated by the fact that deinstallations of old Web Start versions and installations of new Web Start versions might lead to a mess.
    Ideally Web Start would work afterwards such installations without problems, and even better, the old cache would be left intact, so that not everything needs to get downloaded again.
    I had two cases (me playing with 1.01 and 1.01_01, and a colleague playing with 1.01something and trying out the 1.4 JDK beta, where Web Start is a part of the JDK) where this led to a hang of that kind what you described.
    The installation guide
    http://java.sun.com/products/javawebstart/docs/installguide.html
    hints as well that things might go wrong.
    cache corruption, insufficient change detection
    No. 1 is rooted in the observation that Web Start's update mechanism does not work as expected.
    Ideally, when we launch an app, the Web Start client should find out about the main jnlp file and the sub jnlp files and jar files that are used by it. It should detect changes in all those items and download if they changed.
    BTW: I am "updating" the jar files by resigning them
    (using jarsigner).But what changes does it detect?
    - does it just look if something with the same name is already in the cache?
    - does it look at the timestamps of the cache contents and compare that to the timestamps of the versions on the server?
    - does it compare content differences (eg by calculating hashes like md5 or SHA-1)?
    My impression that it does only the first.
    I very often have to empty the whole Web Start cache on the client, when I'm changing/updating jars and jnlps on the server.
    more fun
    No.3 is justified by experience. I had many surprises here.
    Regards,
    Marc

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

  • Update JAR failed with

    Dear all,
    I am working on J2ME with Forte CE 3.0, when I am trying to "update jar" of a simple "hello World" program, sometimes it works / execute, sometimes it fails with an error "cannot start preverifier".
    It normally works after I reboot the computer, and normally fails when I update JAR repeatedly.
    Following is my working envirnoment:
    Windows ME
    Toshiba notebook
    Forte CE3.0 and sdk 1.3..1a
    J2ME1.0.3
    what can be wrong? Please help.
    Godfrey

    I am having the SAME exact problem.
    The output window then states:
    c:\j2mewtk\bin\preverify.exe @ c:\windows\temp\preverify61711.tmp\files.txt
    Cannot start preverifier.
    Errors compiling sample.
    I can compile and my programs only run them once, then this error pops up. I have to shut down Forte for it to work again. Any help would be appreciated.
    Forte 3.0, Java 2 SDK 1.3.1_01, J2ME Wireless Toolkit 1.0.3
    AMD 1.3ghz, 384megs, Win 98
    -Mark Fillmore

  • JWS Not updating Jars in 1.6.0

    Hi,
    I have been using JWS since JRE 1.3. We have a servlet running and up until now I just had to increment the "version" for a respective Jar file and JWS would download that jar nicely.
    I moved to JRE 1.6 this week and for some reason (using the same back end) it seems like JWS launches and "Skips" and jars that have been updated (e.g. the version incremented). If I add new jars it seems to pick them up.
    Any help would be greatly appreciated. My JWS is here:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://var_host/servlet/Loader/loanmagic_v4" href="loanmagic.jnlp">
         <information>
              <title>var_lm4_title</title>
              <vendor>Document Systems, Inc.</vendor>
              <homepage href="http://www.loan-magic.com"/>
              <description>Point of Sale Software for Mortgage Professionals.</description>
              <icon href="loanmagic.gif"/>
              <offline-allowed/>
              <shortcut>
    <desktop submenu="var_lm4_title"/>
    <menu submenu="var_lm4_title"/>
    </shortcut>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <java version="1.6+" initial-heap-size="64m" max-heap-size="256m"/>
    <jar main="true" href="loanmagic.jar" version="4.0025" download="eager"/>
    <jar href="comfyj-2.4.jar" version="4.000" download="eager"/>
    <jar href="jexplorer-1.8.jar" version="4.000" download="eager"/>
    <jar href="jexplorer-dll.jar" version="4.000" download="eager"/>
    <jar href="jniwrap-3.6.jar" version="4.000" download="eager"/>
    <jar href="winpack-3.6.jar" version="4.000" download="eager"/>
    <jar href="jdom.jar" version="4.000" download="eager"/>
    <jar href="jaxen-core.jar" version="4.000" download="eager"/>
    <jar href="jaxen-jdom.jar" version="4.000" download="eager"/>
    <jar href="saxpath.jar" version="4.000" download="eager"/>
    <jar href="xstream-1.2.1.jar" version="4.000" download="eager"/>
    <jar href="jfreechart-1.0.3.jar" version="4.000" download="eager"/>
              <jar href="jcommon-1.0.8.jar" version="4.000" download="eager"/>
    <jar href="calculators.jar" version="4.000" download="eager"/>
    <jar href="jRegistryKey.jar" version="4.000" download="eager"/>
    <jar href="jRegistryKey-dll.jar" version="4.000" download="eager"/>
    <jar href="xml-apis.jar" version="4.000" download="eager"/>
    <jar href="xalan.jar" version="4.000" download="eager"/>
    <jar href="serializer.jar" version="4.000" download="eager"/>
    <!-- FillMagic -->
    <jar href="fillmagic.jar" version="4.000" download="eager"/>
    <jar href="asjava.jar" version="4.000" download="eager"/>
    <jar href="asjava_p.jar" version="4.000" download="eager"/>
    <jar href="fop.jar" version="4.000" download="eager"/>
    <jar href="avalon-framework-4.2.0.jar" version="4.000" download="eager"/>
    <jar href="fsjython.jar" version="4.000" download="eager"/>
    <jar href="rmstools.jar" version="4.000" download="eager"/>
    <jar href="barcode4j.jar" version="4.000" download="eager"/>
    <!-- ViewMagic -->
    <jar href="itext-1.4.5.jar" version="4.000" download="eager"/>
    <jar href="pcl2pdfconverter.jar" version="4.000" download="eager"/>
    <jar href="pclonscreen.jar" version="4.000" download="eager"/>
    <jar href="pclrenderimage.jar" version="4.000" download="eager"/>
    <jar href="FullViewMagic.jar" version="4.000" download="eager"/>
    <jar href="TableLayout.jar" version="4.000" download="eager"/>
    <!-- Variables Passed into LoanMagic -->
    <property name="syncContext" value="/lmserver4/sync/"/>
    <property name="loginHandlerPath" value="var_host/servlet/login"/>
    <property name="useHTTPS" value="var_https"/>
    <property name="newUserSetupURL" value="https://var_host/webservices/loanmagic/newuserintro.jsp"/>
    <property name="emailPasswordURL" value="https://var_host/webservices/login/emailpass.jsp"/>
    <property name="DSIServerPath" value="var_host"/>
    <property name="emailHandlerPath" value="var_host/webservices/email/Processor"/>
    <property name="emailSchemaPath" value="http://var_host/webservices/email/schema/email_process_request.xsd"/>
    <property name="tutorialURL" value="http://var_host/support/tutorials/loanmagic/main.jsp"/>
    <property name="faqURL" value="http://var_host/support/faq/loanmagic/main.jsp"/>
    <property name="supportURL" value="http://var_host/support/main.jsp"/>
    <property name="productSuggestionsURL" value="http://var_host/support/suggest.jsp"/>
    <property name="pricingURL" value="http://var_host/webservices/loanmagic/fees.jsp"/>
    <property name="requestHandlerPath" value="var_host/servlet/RequestHandler"/>
    <property name="requestHandlerDTDPath" value="var_host/webservices/ws/dtd"/>
    <property name="jwsLoanMagicDir" value="loanmagic_v4"/>
    <property name="adminURL" value="https://var_host/webservices/admin?fromlm=true"/>
    <property name="releaseNotesURL" value="http://var_host/webservices/loanmagic/releasenotes_v4.jsp"/>
    <property name="privacyURL" value="http://var_host/privacy.jsp"/>
    <property name="loanAppURL" value="/lmserver/newLoanApp.do"/>
    <property name="comingSoon" value="http://var_host/products/loanmagic/main.jsp?copy"/>
    <property name="applicationVersion" value="4.0024"/>
         </resources>
         <application-desc main-class="com.docmagic.loanmagic.LoanMagic"/>
    </jnlp>
    Note, for example, I could update:
    <jar main="true" href="loanmagic.jar" version="4.0025" download="eager"/>
    to
    <jar main="true" href="loanmagic.jar" version="4.0026" download="eager"/>
    And it would get downloaded when I restart the JWS app on the client. This no longer seems to be the case..
    Maybe I am missing a new tag or something..

    i'm having the same problem.
    there is a new tag in JNLP 6
    <update check="always" policy="always"/>
    but even so , the jars wont be updated.
    However, i noticed that JWS does update it's cached JNLP (you can check from JWS Cache viewer , Show JNLP) but even if in the new JNLP there are new JAR versions specified , it wont get them till next time you launch the app.
    something like this is described here
    http://java.sun.com/developer/community/askxprt/2006/jl0410.html
    Dan

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

  • 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

  • Downloading updated jars with java webstart

    I have a web start application where I download individual data jars using the javaws DownloadService API. These jars change infrequently but do change. My initial implementation was relatively straightforward:
    String dataArchiveUrl = study.getDataArchiveUrl();
    URL url = new URL(dataArchiveUrl);
    DownloadServiceListener dsl = new MyTestDownloadServiceListener();
    ds.loadResource(url, null, dsl);This works great for the initial download and when there is no update to the data jar. The problem is that when the data jar is updated, javaws does not download the update unless I manually delete the original data jar from the web start cache. I had expected(hoped?) that loadResource would work like javaws and check the timestamp of the resource to determine if an update was needed, but that does not appear to be what happened. I have confirmed that the jar timestamps are being served accurately.
    I was able to put in a work around that checks the timestamp and, if the server timestamp is newer, removes the resource from the cache. This forces webstart to update the data jar when the timestamp is updated but is less than ideal for a couple reasons:
    (1) It seems inefficient to open up my own URLConnection to the resource. Is there a way to get webstart to handle the updating for me based on the timestamp?
    (2) The application is designed for offline use. The work around removes the data jar before downloading the new one. This would seem to open a gap where if a user starts downloading an update but gets disconnected before finishing, they won't have access to either the old or new data file. Does anyone have any ideas on closing this gap?

    I have a web start application where I download individual data jars using the javaws DownloadService API. These jars change infrequently but do change. My initial implementation was relatively straightforward:
    String dataArchiveUrl = study.getDataArchiveUrl();
    URL url = new URL(dataArchiveUrl);
    DownloadServiceListener dsl = new MyTestDownloadServiceListener();
    ds.loadResource(url, null, dsl);This works great for the initial download and when there is no update to the data jar. The problem is that when the data jar is updated, javaws does not download the update unless I manually delete the original data jar from the web start cache. I had expected(hoped?) that loadResource would work like javaws and check the timestamp of the resource to determine if an update was needed, but that does not appear to be what happened. I have confirmed that the jar timestamps are being served accurately.
    I was able to put in a work around that checks the timestamp and, if the server timestamp is newer, removes the resource from the cache. This forces webstart to update the data jar when the timestamp is updated but is less than ideal for a couple reasons:
    (1) It seems inefficient to open up my own URLConnection to the resource. Is there a way to get webstart to handle the updating for me based on the timestamp?
    (2) The application is designed for offline use. The work around removes the data jar before downloading the new one. This would seem to open a gap where if a user starts downloading an update but gets disconnected before finishing, they won't have access to either the old or new data file. Does anyone have any ideas on closing this gap?

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

Maybe you are looking for

  • How to use BC4J with JDeveloper 9i in a Team

    Hello I'm not sure if I'm to stupid, but to say the truth I didn't found the clue how to share a BC4J Application between several develeopers. Maybe someone can give me a hint. That's my situation: Our team is going to develop a web application using

  • RFC CALL canu00B4t execute Functions module ??

    Hello everybody, I have a problem with a Function module. The function module should open an link (it´s a Link of a Webdynpro Application). I have the following constellation. Bex Analyzer execute a RFC Call to open/execute the Function module. The F

  • Exit Fm is not to CMOD project but transported to test system

    Hi. I have a enhancement MWMIDO08 with contains function module EXIT_SAPLLMDE_002 and which incldes program ZXLIDU10. I made my necessary changes in the include program and  transported to test system, without creating any CMOD project. But my change

  • Where can I download Group Policy Health Check Tool v.1.0?

    I once saw a screenshot of this tool (Group Policy Health Check Tool v.1.0) from some document.  However, when I search on line for it, it looks like this tool simply does not exist.  Can someone help me?

  • Is the RAW format of Canon PowerShot G7X possibile in Lightroom ver. 5.7?

    I use Lightroom 5 on my Acer PC. I have just bought a new camera, Canon PowerShot G7X, with Raw format possibility. I have also upgraded my Lightroom 5 to version 5.7. Still the application will not accept the RAW format pictures taken with this came