Debugging JNLP lazy download

Hi everyone,
I'm having issues with lazy downloading: it doesn't work in our (rather complex) application with multiple JARs, including third party JARs, all signed with same certificate. When I tested lazy loading with simple application which included two signed JARs, it worked as expected.
My guess is that some class is requesting a resource which doesn't exist and web start is then loading all JARs, even lazy ones, trying to find that resource.
I could see on this forum people are talking about log files listing classes and other resources being requested by JWS, but I can't seem to enable this info to be logged. I've turned on logging and tracing in java control panel. I also tried running web start by using javaws with both -verbose and -J-verbose:class arguments. I also tried adding
          <property name="javaws.debug.0" value="+TraceSecurity" />
          <property name="javaws.debug.1" value="+TraceCache" />
          <property name="javaws.debug.2" value="+TraceDiskCache" />
          <property name="javaws.debug.3" value="+TraceDownload" />
          <property name="javaws.debug.4" value="+TraceXMLParsing" />and java-vm-args="-XX:-TraceClassLoading -XX:-TraceClassLoadingPreorder -XX:-TraceLoaderConstraints" to JNLP file but it didn't help.
I'm kind of getting desperate trying to figure this out, so any help would be appreciated. Thanks.

Yes, main JAR contains index of all used JARs and additional JARs have been marked as belonging to different part.
I managed to find a problem: I've been using ant to generate JAR index, which didn't add folder information to JAR index. Eg. inside jar task I had something like:
<indexjars>
     <fileset dir="${websites}/lib/">
          <include name="jdom.jar" />
     </fileset>
</indexjars>However, when index file was generated it listed jdom.jar without subfolder in which it's located (jdom.jar instead of /lib/jdom.jar). I managed to fix this by creating manifest for main jar and adding all additional JARs to it's classpath, eg:
<manifest file="${websites}/ALL-MANIFEST.MF">
     <attribute name="Class-Path" value="/lib/jdom.jar" />
</manifest>So, lazy downloading is working now.
However, it would still be nice to know how to display class loading information (-verbose:class jvm argument) inside Web Start application, as it might be helpful in the future.

Similar Messages

  • 'lazy' download test

    http://www.javasaver.com/testjs/jws/cache/
    Here is one test of the JWS download behaviour
    for jar and resources marked as lazy.
    Does it work for you?
    (It should appear on-screen real quick, once
    you click a list item, the image download is
    initiated and the GUI ..locks until the image
    is on-screen)
    This raises some questions though.
    1) On my box, the lazy downloads got no progress
    dialog - is that expected behaviour? Is there any
    easy (configuration) way to put it back?
    2) I had to reference the classes in the lazily
    downloaded jars using reflection. Are
    there easier ways to reference the lazy resources
    without invoking an eager download?
    Note that I have also linked to a file containing
    the source, media and build file, to make it easy
    to download and experiment with off the local
    file system.
    All results, comments welcome.

    http://www.javasaver.com/testjs/jws/cache/#eg5
    Is the best example so far. The previous examples
    blocked the EDT, and that caused the 'blank' dialogs
    that were observed.
    I am having new problems with it though,
    & would appreciate any ideas..
    The issue is that the second invocation
    of the download service fails.
    Here is some output from the web start console.
    Part animal cached!
    jar:http://www.javasaver.com/testjs/jws/cache5/animalmedia.jar!/image/DCP_7940.jpg
    DownloadServiceListener com.sun.jnlp.DownloadServiceImpl$DefaultProgressImpl@2f1921
    Part plant downloading!
    jar:http://www.javasaver.com/testjs/jws/cache5/plantmedia.jar!/image/100_1829-800x600.jpg
    DownloadServiceListener com.sun.jnlp.DownloadServiceImpl$DefaultProgressImpl@2f1921
    Part art downloading!
    java.lang.RuntimeException: canceled by user
         at com.sun.jnlp.DownloadServiceImpl$DefaultProgressImpl.progress(Unknown Source)
         at com.sun.jnlp.DownloadServiceImpl$ProgressHelper.<init>(Unknown Source)
         at com.sun.jnlp.DownloadServiceImpl$6.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.DownloadServiceImpl.loadPart(Unknown Source)
         at com.sun.jnlp.DownloadServiceImpl.loadPart(Unknown Source)
         at test.JWSCacheTest.run(JWSCacheTest.java:78)
         at java.lang.Thread.run(Unknown Source)
    jar:http://www.javasaver.com/testjs/jws/cache5/artmedia.jar!/image/scan0036-670x470.jpgWhile this is the code for the run() method,
    Line 78 has a comment added..
    It is the call to ..
    downloadservice.loadPart(Sring, String)
    ..that is throwing the Exceptionpublic void run() {
      String title = getTitle();
      setTitle("Loading " + resourceName);
      try {
        if (downloadservice==null) {
          downloadservice = (DownloadService)ServiceManager.
            lookup("javax.jnlp.DownloadService");
        if ( !downloadservice.isPartCached(part) ) {
          DownloadServiceListener dsl =
            downloadservice.getDefaultProgressWindow();
          System.out.println("DownloadServiceListener " + dsl);
          System.out.println("Part " + part + " downloading!");
          downloadservice.loadPart(part, dsl);  // code line 78
        } else {
          System.out.println("Part " + part + " cached!");
      } catch(Exception e) {
        // ignore the USE or IOE and proceed..
        e.printStackTrace();
      try {
        Class displayClass = Class.forName(resourceName);
        setTitle(title);
        imagePanel.add(
          (Component)displayClass.newInstance(),
          images[index]);
        cl.show(imagePanel, images[index]);
      } catch(Exception e) {
        setTitle(title);
        imagePanel.add(
          new JLabel("Error loading!"),
          images[index]);
      validate();
    }Why would that be showing as 'canceled by user'
    on any second invocation of the downloadservice?
    Is there something I am forgetting to reset at
    the end of the first invocation?

  • Lazy download - howto?

    All that is said about lazy download is that it "can be accomplished using Jar Indexing". But what about examples and tutorials?
    I have three jars, for example, core.jar, aux1.jar and aux2.jar. And some jars with graphics, res1.jar, res2.jar and res3.jar.
    then I cd to the directory that contains all jars, run:
    jar i *.jar and acquire INDEX.LIST in first jar file. Then I set download="lazy" in my jnlp file, but all jars are downloaded before the start of the application.
    So a few questions.
    1. What I am doing wrong?
    2. How to get resources to download when they are really needed?
    Thanks.

    First thing I can think of: did you set a different part for the lazy jar? 'cause whenever one jar of the part is asked they all get downloaded (this means any jar in the same jnlp if no part specified).
    Second: I've succesfully used lazy with indexing, having index.list in the main jar (not just the first) using something like:
    jar -i Main.jar *.jarCan't think of anything else right now.
    Bye.

  • Jnlp file downloads then opens in TextEdit

    Have multiple Macs running 10.5.7 w/latest software update. Each trying to use the same web application. Web app downloads a .jnlp file. For most Macs, it launches Java and life is good. On a lone Mac (so far), the .jnlp file downloads, but is opened by TextEdit. Check File Info, and it's associated with TextEdit, so there's the culprit. On the working Macs, the file is associated with Java Web Start.app. So, I figured I'd change the association on the Mac that's broken, but I can't find Java Web Start.app. It doesn't show up in Spotlight, so I use the locate command in Terminal and find it listed as being found in /Applications/Java. This folder does not exist on any of the Macs in this scenario. Where is it?! How do I fix the association for .jnlp files to be Java Web Start.app?
    Thanks!

    I have the same problem. After running the latest Java update, Java Web Start is gone. I have Xcode installed on my machine, but still don't have Java Web Start anywhere on my drive.
    I attempted to restore it to /Applications/Utilities/Java using Time Machine, but when I launched it, it merely crashed.
    I understand that part of the Java update was to patch a vulnerability that could be exploited through Java applications launched from the web, but I was under the impression that there was a fix that didn't simply involve disabling Java Web Start. Is there a new version of Java Web Start out there that doesn't crash with the new Java update? Alternately, is there a way to run a jnlp file without a working version of Java Web Start?
    I have a program that I absolutely need to have running in the next 30 minutes -- which doesn't give me enough time to roll back the whole update. Is it too much to expect Apple to fix what they broke with this update?
    -JMP

  • Dependency JAR debugging in JWS operation: Eager/Lazy downloads

    I'm trying to see if there is a way to watch which .JARs is downloaded as a program runs. However, if there are [import] statements in the main class, wouldn't the dependency .JARs be downloaded anyway? I just want to test the download patterns of a JWS application and see its results.
    Specifically, I want to know when the JAR was downloaded in the course of runtime.
    Currently, I have a main JAR and 3 dependency JARs; each JAR contains only one package with only one class within it. The main JAR will call methods from 2 of the 3 dependency JARs, which simply return strings to be printed to a console that is instantiated in the main class/JAR.
    In the JNLP file, I will toy with the lazy/eager download settings for each of the dependency JARs, testing its behavior when each of the JARS are downloaded eagerly and lazily, with one of the JARs acting as control.
    Is it possible to print the downloaded/not-downloaded status of each JAR to the console in my main class? Is there more I can do to this code so it can display whether or not JARs have been downloaded, and in what order?
    //This is the main class. This will be declared as such in the JNLP.
    package front;
    import javax.swing.*;*
    *import java.awt.*;
    import java.io.*;
    import right.RightOf;
    import left.LeftOf;
    import back.BackOf;
    public class FrontOf extends JFrame{
    ObjectOutputStream out;
    private JTextArea consoleout;
    public FrontOf(){
    Container c = this.getContentPane();
    consoleout = new JTextArea();
    c.add(new JScrollPane(consoleout), BorderLayout.CENTER);
    setSize( 300, 150 );
    this.setVisible(true);
    public void rockout(){ //The test operation. Note the dummy package's operations have been commented out.
    RightOf unit01 = new RightOf();
    LeftOf    unit02 = new LeftOf();
    //BackOf    unit03 = new BackOf();
    consoleout.append(unit01.go());
    consoleout.append(unit02.go());
    //consoleout.append(unit03.go());
    public static void main(String args[]){
    //This is code for one of the dependency classes/JARs. The other two are identical except for names and strings.
    package left;
    public class LeftOf {
        String debug;
        public LeftOf(){
            debug = new String("UNIT 01 ACTIVE");
        public String go(){
            return debug;

    jkc532 wrote:
    .. Is the fact that the CachedJarFile class doesn't attempt to reload the resource when it can't retrieve it from MemoryCache a bug? From your comprehensive investigation and report, it seems so to me.
    ..I've dug as deep as I can on this and I'm at wits end, does anybody have any ideas?Just after read the summary I was tired, so I have some understanding of the effort you have already invested in this (the 'wits' you have already spent). I think you should raise a bug report and seek Oracle's response.

  • Lazy download and PrintServiceLookup.lookupPrintServices

    In my jnlp file all jars are with "lazy" tag, and everything works fine, but when I execute this line of code:
    javax.print.PrintService[] result = PrintServiceLookup.lookupPrintServices( null, null );
    all of the jar are downloaded.
    I've opened the bug request n: 830151 (but this is only an internal ID) 2 months ago, but got no answers yet.
    Any ideas or suggestion?
    Regards
    Alessandro

    If you attempt to load a non-existant resource, all
    jars will be loaded looking for it.
    This can be avoided in JDK 6 using JarIndexing to
    specify what jar contains what resources.Never tried JDK 6.
    In JDK 5.0_02+, you can also achieve the same thing
    using the "part" and "package" attributes.
    In previous versions of Java Web Start, neither of
    these worked, so accessing a non-existant resources
    would always download all lazy jars.
    /AndyI use jre1.5.0_08 and my jnlp (for the test case) is:
    <package name="testJWS.*" part="main" recursive="false"/>
    <jar href="/client/test-jws/starter.jar" part="main" download="lazy"/>
    <package name="testJWS1.*" part="test1" recursive="false"/>
    <jar href="/client/test-jws/testJWS1.jar" part="test1" download="lazy"/>
    <package name="testJWS2.*" part="test2" recursive="false"/>
    <jar href="/client/test-jws/testJWS2.jar" part="test2" download="lazy"/>
    <package name="testJWS3.*" part="test3" recursive="false"/>
    <jar href="/client/test-jws/testJWS3.jar" part="test3" download="lazy"/>
    <package name="com.incors.plaf.*" part="alloy" recursive="true"/>
    <jar href="/client/test-jws/alloy.jar" part="alloy" download="eager"/>
    So, according to what you say, it should work.
    My test case is very simple: a main jar which opens a JFrame contained in testJWS1.jar, which opens a form conteined in testJWS2.jar and so on.
    Without the PrintServiceLookup, works perfectly, the jars are downloaded only when needed.
    With that line of code everything is download at that moment.
    How can I say to JWS something that concern resources contained into rt.jar of the JRE (like PrintServiceLookup)?
    I've tried to debug this class (I've found the source code, copied in my class, and used mine with some debug message) and saw that the download appens when Java looks for the file javax.print.PrintServiceLookup which is inside rt.jar\META-INF\services
    This file exists ... but it seems like JWS looks for it in all the jar of the classpath (including lazy jar), and then inside rt.jar which is the right place.
    Any idea how to say to java: look inside rt.jar before my lazy jars?
    The problem is that I cannoy say (don't know how) to JWS that a file is inside the META-INF folder of a jar, otherwise I could copy that file inside my first jar and tell to the JNLP to look there.
    Thanks
    Alessandro

  • Jnlp .jar download

    Hi,
    I am making a java web start application. I have so many jar files, which are being used by that application...I am adding the jar files like this:
    <jar href="lib/appframework-1.0.3.jar"/>
    <jar href="lib/swing-worker-1.1.jar"/>
    Actually When I try to run the application offline, it works fine. But when I try to run the application online, it gets very slow...it takes time to download jar files(I think so).....and it takes five minutes to execute a functionality by the application. I don't know how can I fix this. The size of some of the jar files in the resources are big...
    Please let me know the solution of this problem!
    Thank you.

    Please post full JNLP file here.
    How big is "big" here?
    Do you have <update check="background"> in your JNLP file?
    Debug hints:
    * Enable java console, enable verbose tracing (http://download.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html#gcexdf)
    and see what is going on when application takes longer than you expect
    * Use http sniffer tools to trace network connections on startup (e.g. wireshark). Your goal is to have 0 network connections when application is cached.

  • Lazy downloading not working!!!

    Dear all,
    I have four jars in my jnlp file, apart from the main jar. All the jars apart from the main jar is declared as "lazy", and there is no dependency b/w these jars. When a class in the third jar is instantiated, the first two jars in the jnlp file got downloaded even though they were declared as lazy.
    Now, I used the DownloadService API to download the third jar explicitly, so that the other jars wont get downloaded. Even then, when the class is instantiated, all the jars are getting downloaded.
    Any solutions please??
    Thanks in advance
    Anil

    The package element is described in the jnlp spec, which you can download from http://java.sun.com/products/javawebstart/download-spec.html
    An example of using package is as follows:
    <resources>
    <jar href="myapp.jar" part="myjar" />
    <package name="com.mysite.myapp.*" part="myjar" recursive="true"/>
    This tells Java Web Start that all classes beginning with com.mysite.myapp can be found in myapp.jar.
    Regards
    Brendan

  • Progress dialogs for (eager and lazy) downloads

    <resources progress="all-downloads">
    </resources>
    Where 'progress' values are
    "standard" - default behaviour if omitted - progress
       dialog for eager downloads only
    "all-downloads" - progress dialog supplied for all
       downloads, eager or lazy.
    "none" - (suggest) no progress dialogsThe 'progress' attribute is not something in the
    web start API, but I would like to see it added.
    The intent is to allow the JNLP file to suggest a
    behaviour for progress dialogs during the download
    of both eager and lazy resources.
    Currently (web start in 1.5), there is no progress
    dialog, or message of any kind, during the download
    of 'lazy' resources.
    My questions.
    Is it technically feasible to provide this ability?
    Does it conform to the web start ..framework?
    Would an RFE to add support for this 'progress'
    attribute (call it what you like) be well received
    (or disappear into the abyss as some other
    requests assigned an ..'internal review ID'
    sometimes seem to)?
    More generally to other forum members, is
    this something that is important to you?
    Would you vote for an RFE to support the
    progress dialog attribute?

    ScheduleWorld used to use around 40 jars and I noticed a big speedup when I started using the version protocol. Now, my httpd logs only report a HTTP HEAD request on the jnlp file (sometimes icon image too?) and the app starts quite fast. I use less jars now but I am sure the main thing is the switch to the version protocol.
    With the version protocol, the client can determine if it has all of the right versions without making network connections. If you have a slow network connection (like a modem) and/or your server has keepalive disabled and is rate-limited to the number of new connections/second to the same IP you could see exactly what you are describing.

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

  • Debugging JNLP security problems

    As we all know, the latest Java update changed the JNLP security around a bit, and I, like many others, am having trouble with it.
    I'm not really here to ask for help with my specific problem, however. It's not the first time I've had trouble with JNLP security, and almost every time, I've only gotten around it with the help of mere guess-work and a fair bit of luck, and I'm still far from sure I've actually solved the problems correctly. The main problem I experience is that the security messages I get from the JNLP client are oriented towards end-users and thus not very helpful at all for tracking down the root cause of the issues. For instance, after this latest update, the JNLP client is just telling me that "The Java security settings have prevented this application from running. You may change this behavior in the Java Control Panel."
    Is there any good way to find out what security problems it is that I'm actually having? "Read the documentation" is of course the easy answer, but the security model seems rather complex and incorporates many parts. Is there some kind of "lint" tool for JNLP out there that can list the problems I'm having? Or is there some way to run the JNLP client in some kind of debug mode?

    Understood guys. But let me make a few points.
    1. Clearly I'm not the only one who had this problem. In fact, I wasn't the first person in this THREAD to have the problem.
    2. I'm fairly computer savvy, and have worked with Photoshop for several years.
    3. Yes, it does say c: in point 3, but I find it odd that in point 4 it does say Program Files/.... A very strange way to write it. Also, the c: drive is the default installation drive, so it's not idiocy for someone to assume that the file would be located on the same drive as you selected for installation.
    4. This is not about technically right or wrong. I never said that the instructions were wrong. I merely was trying to make a suggestion that would help people avoid the same trap I fell into. Was it my mistake? Yes. Would my clarifying suggestion perhaps help others avoid making the mistake I did. I would hope so. Also, as someone else suggested in this thread, Adobe SHOULD have written an installation program for the ACR 3.1 upgrade that did the placing automatically. After all, EVERYONE knew that ACR3.1 would be released shortly after the release for CS2...in fact Mr. Knoll himself was quoted in other forums about when D2X compatibility would actually happen.
    5. The purpose of these forums is to be helpful to other users--not to be patronizing or rude. I'm a big Photoshop fan, and a loyal customer. I'm also in the service industry, and I would bet that customer service experts would raise an eyebrow or two about the tone contained in certain messages in this thread, including from an Adobe employee.
    Just my two cents. Flame away if you must. But you might want to take a look at what I actually suggested in my last message before lighting up the torch.

  • JNLP auto-download problem

    Hello everyone
    I have an app for which JRE should come from my server. I have created a servlet to handle my jnlp files (mapped as *.xjnlp) and two file for the application and runtime installer respectively.
    Here is an excerpt from the main launch.xjlp
    <resources>
         <j2se version="WASJRE" href="../JREDownload.xjnlp"/>
    </resources>and here is what I have got in JREDownload.xjnlp
      <resources>
         <j2se version="1.5+"/>
         <jar href="lib/WebSphereClientRuntimeInstaller.jar" main="true"/>               
         <!-- JRE version registration with Java Web Start -->     
         <property name="com.ibm.websphere.client.jre.version" value="WASJRE"/> 
      </resources>From what I see it looks like JWS does not even try to access the JREDownload.xjnlp in order to download the WAS Client runtime jar. So I keep getting -
    The application has requested a version of the JRE that currently is not locally installed. Java Web Start is unable to automatically download and install the requested version.
    Anyone had any experience with this? Any idea is much appreciated
    thanks

    Thanks Andrew,
    I guess I should have provided more details. What I did was based on the documentation and samples from IBM which requires installing IBM specific JRE in order to run a J2EE client from JWS and provides its own client runtime installer.
    Here are my xjnlp files in more details
    launch.xjnlp
    1. <jnlp spec="1.0+" codebase="$$codebase">
    2.   <security>
    3.    <all-permissions/>
    4.   </security> 
    5.   <resources>
    6.      <j2se version="1.6" href="../JREDownload.xjnlp"/>               
    7.             <jar href="../lib/WebSphereClientLauncher.jar"/>
    8.             <jar href="../lib/properties.jar"/>
    9.      <jar href="SwingCalculator.ear"/> 
    10.                 <property name="com.ibm.websphere.client.launcher.ear" value="SwingCalculator.ear"/>
    11.   </resources> 
    12.   <application-desc main-class="com.ibm.websphere.client.launcher.ClientLauncher">
    13.      <argument>-CCtrace=yes -CCproviderURL=corbaloc:iiop:xuyvam:2810</argument>
    14.   </application-desc> 
    15. </jnlp>JREDownload.xjnlp
    1. <jnlp spec="1.0+" codebase="$$codebase">
    2.   <security>
    3.      <all-permissions/>
    4.   </security> 
    5.   <resources>
    6.      <j2se version="1.5+"/>
    7.      <jar href="lib/WebSphereClientRuntimeInstaller.jar" main="true"/>               
    8.      <!-- JRE version registration with Java Web Start -->     
    9.      <property name="com.ibm.websphere.client.jre.version" value="1.6"/> 
    10.   </resources> 
    11.   <resources os="Windows"> 
    12.      <jar href="AppClient70_Windows.jar"/>     
    13.   </resources>  
    14.   <installer-desc main-class="com.ibm.websphere.client.installer.ClientRuntimeInstaller"/>
    15. </jnlp>launch.xjnlp is the one that gets initially requested. At line 6 it requests specific JRE and hrefs to it by pointing to JREDownload.xjnlp. Now, JREDownload is responsible for downloading, installing and registering the IBM's JRE. On line 14 we have <installer-desc> which points to the main class found in the WebSphereClientRuntimeInstaller.jar referenced at line 7. Once installed, this JRE is registered with JWS at line 9.
    Note that both xjnlp files are processed by a servlet which basically gets the files, replaces the variables, sets the mime type to jnlp and outputs back into the stream.
    Thanks a lot
    Aram

  • Debugging a delta download

    Hi,
    I want to debug a client delta modification in order to see the hardcode functionality. I tried setting a breakpoint in BUPA_MWX_BDOC_DOWNLOAD_R3A FM (mapping module in CUSTOMER_MAIN object. See R3AC1 tcode).
    Then, I modified a R3 customer but the breakpoint seems not to work. The modification is correctly updated in CRM system, so the delta is working ok.
    Does anyone know how to debug this process?
    Thanks in advance
    Regards
    Javier

    Hi Javier,
    Here is what you do.
    1. Go to SMQR and De-Register all the queues.
    2. Change R3 customer.
    3. Goto SMQ2. You shall find a queue entry for this customer.
    4. Double click on this entry. You shall see that this entry has status ready.
    5. Again double click on the queue name.
    6. Now select this entry and click on Debug LUW button.
    7. In the debug mode, put breakpoint at your FM.
    8. This should now stop at your FM.
    Do let me know and kindly reward points if this helps.
    Regards
    Kaushal

  • JNLP jar (re)download

    Hello All ,
    I might be having a fundamental misconception here ; if so , please help me put it right.
    I have a JNLP file which is automatically generated (automatic here actually indicates that a script will populate a particular field in the file (which holds references to some jar files). The rest of the file does not change)).
    I am using the <version> attribute of the <jnlp> tag to indicate the version of the application.
    My expectation is that each time this version attribute changes , the .jnlp file wlil be re-downloaded and also will be re-downloaded each of the jar files it references.
    Below is a representative code sample :
    <code>
    <?xml version="1.0"; encoding="utf-8"?>
    <jnlp
    spec="1.0+";
    codebase="$$codebase"
    href="$$name"
    version="%VERSION%">
    <!-- version to be filled in by a script-->
    <information>
    . <!-- Some information here -->
    </information>
    <security><all-permissions/></security>
    <resources>
    <j2se version="1.6+"; initial-heap-size="32m" max-heap-size="512m" />
    <jar href="my.jar";/>
    <jar href="my2.jar";/>
    <property name="property1" value="value1" />
    <extension href="another.jnlp"; /> <!-- another .jnlp contains a list of jars that is generated by another script -->
    </resources>
    <application-desc main-class="my.main";/>
    </jnlp>
    </code>
    The following scenario is what I am trying to implement :
    a)Deploy the jnlp application on a server and access it by using http://localhost:XXXX/myapp
    b)It downloads and installs and runs.
    c)I close the app.
    d)I now change one of the jar files referenced in another.jnlp and also some contents in my.jar and my2.jar.
    e)I now repeat steps a) and b) (the .jnlp files "version" attributes are updated accordingly)
    EXPECTATION : The jnlp file is re-downloaded and so are all the referenced jars[of particular interest my2.jar and any referenced jars in another.jnlp].
    OBSERVATION : The jnlp file is re-downloaded but the OLD jars are still being used (I know its the old jars because I change something in the jar on the server and the change is not reflected in the client browser).
    If I clear the java cache by doing a "javawas - uninstall" , I get the behaviour I seek in EXPECTATION ; however I do not want to clear the cache everytime I update some jar or other ; I want jnlp to detect that a jar has changed and re-download it.
    How do I go about achieving this?

    elie_nasrani wrote: I have a JNLP application which will run over internet , my problem is that anyone can go to the url and launch the application and download all the jars, before even logging in, i'm worried about using this for Denial of service.
    is there a way that i can control the jar files download time, like only download the necessary jar first and when jars are needed will be downloaded eventually
    Web start offers lazy downloads, as well as the DownloadService* (DS) to help with this kind of problem.
    'Lazy' means the resource is only downloaded when needed, but using the DS offers even greater control, even to the extent of manually blocking a download - if needed.
    * e.g. of the Download service, be sure to follow the links.
    <http://www.physci.org/jws/#ds>
    As far as 'signing' goes, I cannot imagine how that would help for your problem. Not only are signed Jar's (at least slightly) larger, but they can also be used by JWS apps. coming from other domains! If your app. is sandboxed, I strongly recommend keeping it as unsigned code.
    Why is your JNLP file exposed to the general public? Don't the users have to log in before they can get to the page with link to the application JNLP?
    If that is the case, the only chance for users who are not logged in to launch it, is if a friend sends them a direct link to the JNLP file.
    As an aside, I generally do not have time to look at posts with no 'dukes' assigned (see links at upper left), if getting a solution is important to you, it is a good idea to add some.

  • Control JNLP jar files download time

    Hello,
    I have a JNLP application which will run over internet , my problem is that anyone can go to the url and launch the application and download all the jars, before even logging in, i'm worried about using this for Denial of service.
    is there a way that i can control the jar files download time, like only download the necessary jar first and when jars are needed will be downloaded eventually
    Any Help would be appreciaetd
    regards

    elie_nasrani wrote: I have a JNLP application which will run over internet , my problem is that anyone can go to the url and launch the application and download all the jars, before even logging in, i'm worried about using this for Denial of service.
    is there a way that i can control the jar files download time, like only download the necessary jar first and when jars are needed will be downloaded eventually
    Web start offers lazy downloads, as well as the DownloadService* (DS) to help with this kind of problem.
    'Lazy' means the resource is only downloaded when needed, but using the DS offers even greater control, even to the extent of manually blocking a download - if needed.
    * e.g. of the Download service, be sure to follow the links.
    <http://www.physci.org/jws/#ds>
    As far as 'signing' goes, I cannot imagine how that would help for your problem. Not only are signed Jar's (at least slightly) larger, but they can also be used by JWS apps. coming from other domains! If your app. is sandboxed, I strongly recommend keeping it as unsigned code.
    Why is your JNLP file exposed to the general public? Don't the users have to log in before they can get to the page with link to the application JNLP?
    If that is the case, the only chance for users who are not logged in to launch it, is if a friend sends them a direct link to the JNLP file.
    As an aside, I generally do not have time to look at posts with no 'dukes' assigned (see links at upper left), if getting a solution is important to you, it is a good idea to add some.

Maybe you are looking for

  • While loading transaction data into cube what are the tables generats

    Hi, while loading transaction data into cube what are the tables normally generats.

  • Substitution MIRO

    Hi all, I created standard substitution for fill cost center in tax account for MIRO, but when I post I got message "Account xxx requires an assignment to a CO object". Where is problem? BTE1120 didn't help yet. But when I fill cost center for this a

  • Best way to load CSS depending on language

    What's the best way to load CSS depending on user language? If I am making a publishing site with 2 languages then how do I load particular CSS depending on language? I know one way to use is to use javascript (jquery) but I was thinking if there is

  • Location services fault in OS 4.0?

    I'm on o2 in the UK and updated to OS 4.0 this morning. All seems to have gone well but I compared mine to my friend's on Vodafone (he also has a 3GS) and under his 'Location Services' he has options for his camera and Tune-In Radio (an app we both h

  • Any way to create a simple report selection menu for end user?

    Hello.  We purchased two full versions of Crystal Reports 2008, version 12.3.1.684.  One copy is for me, where I create reports and the second copy is for an end user who runs them.  I would like to create a basic menu so when he starts his copy of C