JAR downloading

We had an application based on java applet. After every new deployment the version changes and it downloads the new jar on the client's PC. Out client has one server which has capability to push the required files on each configured client PC.
Proposal from client is to push the jar file and the index file to the user_profile folder of the user. The problem that I am facing is when java downloads the jars:
- It decrypts the jar
- The name of the jar is appended with some hex numbers.
- It creates the index
I wanted to know the details about all the above three items. Can I explode the jar file in the required format/create index and then push to client's user_profile folder.
We are still doing experiments in order to understand the concept of this hex numbers.

Here is something curious....
http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/applet_caching.html#algorithm
Known Issues
Caching of the .jar files specified in the manifest's Class-Path variable using Java Plug-in's cache is currently not supported.
The path specified in the cache_archive must be a relative URL to the applet's codebase. Full URLs are not supported in cache_archive.
* If you get the "java.io.IOException: Caching not supported for ..." exception, this is because Java Plug-in was unable to get the expiration and last-modification dates for a given JAR file from the web server. If the Java Plug-in cannot get this information, there is no point in caching since the JAR file will be downloaded every time it is used. Even with this exception, however, the applet should work fine. This exception is merely informative.
Now I specify only the one jar in the archive section of the html, which contains a jar with the classpath to all the necessary jars in the manifest and and Index file as well.
Each new jar shows up in the java cache and the console itself refers to the jar in the cache....
Reading certificates from 11 http://blahblahblah.jar | C:\Documents and Settings\dude\Application Data\Sun\Java\Deployment\cache\6.0\20\61ee19d4-232a6a61.idx
Is it possibly downloading the jar every time to the cache?

Similar Messages

  • Jar download not working over dial up

    Hey,
    Our webstart application works just fine while connected to the lan at work. The various jars required by the application are downloaded without any problems.
    However, when I try to access the same application over dial up (I have tried netzero and aol), the jar download fails in a rather weird fashion.
    On clicking on the link for the application, the main jar e.g. main-application.jar downloads just fine, but the next jar in line fails with the following message
    Unable to load resource: https://server.com:443/application/lib/axis.jar
    Exception
    JNLPException[category: Download Error : Exception: java.net.SocketException: Unexpected end of file from server : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source)
         at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Wrapped Exception
    java.net.SocketException: Unexpected end of file from server
         at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
         at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
         at com.sun.javaws.net.BasicNetworkLayer.doRequest(Unknown Source)
         at com.sun.javaws.net.BasicNetworkLayer.doGetRequest(Unknown Source)
    Now, when i click on the application launch again, it proceeds to download the next jar e.g axis.jar in this case without a problem, but it will fail on the next jar
    snippet from my jnlp file
    <jar href="application.jar"/>
    <jar href="lib/axis.jar"/>
    <jar href="lib/castor-0.9.5.2-xml.jar"/>
    <jar href="lib/commons-beanutils-1.5.jar"/>
    <jar href="lib/commons-collections-2.1.jar"/>     
    Note : All of this works fine when im not using dial up to connect.
    Does anyone have any ideas ?
    Any help is greatly appreciated

    pboeykens,
    It may definitely be something with my network and/or firewall configuration. I'm just not sure where to look yet.
    I have tried modifying apache settings to no avail.
    I've tried turning KeepAlives off, changing the keep alive timeout and the max number of keep alives allowed on apache, but none of these setting changes had any effect on the jar download.
    If you have any suggestions for what I might look at as far as my firewall settings, then I can take that to my security department.
    My next step is to try and enable the debug logging with webstart to maybe get a better idea of why it thinks that no jar is available.
    Thanks

  • N96 wont accept Jar downloads

    For the past few days my n96 will not allow JAR downloads to reach more than 3/4's of the total download .It then says, "unable to download." I know it's not the apps or games i'm trying to download because a few of them were things I had downloaded successfully a few days earlier but deleted for one reason or another. Since I knew they had no problem being downloading I used them to see if the problem was the new downloads and it isn't. Sis files seem to have no problem but jar files won't download anymore. Any suggestions?   thanks JL2

    i have the same problem, i was trying to download from Ovi and i got an error Jar and jar file aren't the same size... like what does that mean???? i've requested help, so if i get an answer i'll pass it on to you.

  • Custom JnlpDownloadServlet: JAR downloads occur twice?

    I've implemented a custom version of the JnlpDownloadServlet, because I primarily want my own handling of the URL query string. I have it setup to handle both JNLP and JAR downloads and all seems to work - the JNLP apps and JARs download then start and that is good. For simplicity I initially left out jar-diffing, versioning as well as pack200 handling, but decided to try including pack200 handling just now. Again, I seem to have it running fine, but, in the process of setting this up, I found (by displaying the DownloadRequest within the servlet's handleRequest method) that the JNLP client (Web Start) appears to be:
    1) on an initial JNLP application launch, requesting each JAR twice
    2) on subsequent JNLP launching (with no cache clear), requesting each JAR once more
    In each case, the pack200 JAR is found and sent. As far as I can tell, Web Start is functioning ok, but I am mystified by this apparent multiple and repetitive downloading of JARs. Is this expected behaviour? Is it something that I need to take care of, like maybe with some sort of versioning or whatever? Is there some sort of debug tracing I can set in the Web Start client to see what's going on?

    Looks like I get to answer my own. J
    I noticed JnlpDownloadServlet does not implement doHead(). It would make sense if it were, so I tried implementing it within my own servlet, and once deployed, noticed that Java Web Start client uses HEAD requests frequently, so this all makes sense now from point of view of Web Start.
    But it looks like there is an omission within JnlpDownloadServlet - it needs a doHead() implementation. Consequently, anyone using JnlpDownloadServlet out of the box from Java 5 and 6, will be causing Web Start clients that use their deployment to always get JARs whether they are in local jar cache or not. I suppose that Web Start client tries HEAD request first, and gets nothing, and so tries GET request.

  • HTTP Jar Download Read Timeout

    For some reason I've been having a hard time finding the setting which controls the read timeout for JAR downloads. At the moment it looks like it will never timeout such that if I am about to download a jar and the server goes down, the read will never timeout.
    TIA

    Yeah, jar downloading will use URLConnection and HTTP by default. What is not clear to me is if you can set the read timeout value in 1.4.2 and if my presumption is correct that if one does not set a read timeout value that a client could hang on a read indefinitely. I don't have the source to any concrete subclass of HttpUrlConnection that has a settable read timeout value.

  • Jar download folder?

    Hello to all,
    i am proving to write code for using with webstart and have a problem. I want to my aplication unzip the jar files that were downloaded but, where does webstart download them? I have searched and i have seen that a structure od folder are created depending of the domain and port. How can i compound the whole tree? Webstart rename some folders and the jar files too. I need the whole path to pass it to my application to catch the jar's from the correct path. And.. is it possible to change the download folder?
    Another question:
    Tracing my program, i have seen that webstart doesn't run my program in the jar's download folder. It runs it in my user desktop folder, and so, my program doesn't find any jar to unzip there. Are any way to tell to webstart where to run the application? I.d. the jar download folder.
    Thak you very much for you attention

    I run into the same problem. The user of the application will need to alter some files to use the
    application. There are two possible solutions:
    -Store the configuration files on the server
    -Store them locally
    Storing them on the servers would be nice however:
    ->There will have to be a server that automatically stores & sends back files as requested by
    the user. Implementing such a server is not trivial on one hand and second, depending on
    the network speed and file size can be quite slow. Also, there will have to be a login necessary
    to access files and ...
    Ok, I decided to store them locally. I am just about to do it, so that's the plan:
    -> ZIP the files to be unpacked on the local system and put them into a .jar file sent as resource
    when loading the Java Web Start Application. Accessing will be easy and can be done with:
    this.getClass().getClassLoader().getResourceAsStream("PATH TO ZIP FILE");
    The important part is to put the zipped files again into a jar file, that way, unzipping can be
    done easy without having to find the jar file on the local file system!

  • Dialup jar download error

    Hi,
    We are seeing an odd occurence. Our dialup users using Java Web Start are unable to download certain jar files if they are a certain size. For example when we deploy our code we need to verify that it will work over a dialup connection. If it does not work we add an additional file to the jar until we get to a size that works???? We can consistently recreate this. We have expirienced it at two different jar sizes so far (255-265 Kb + 320-330 Kb). We have a work around by adding files until it works but this is a hit or miss type of fix. We use signed jar files. The error is a download error. Any help would be appreciated.
    Thanks

    The ISP that we recreated the error on was ATT World Net. The error message that we are seeing is:
    Category Download Error: Corrupted JAR fiel at <our URL>
    ZipException: Error in opening zip file.
    We are using version 1.4.2_03 of the JRE. We download 4 separate jar files during the launch of the jnlp. If any of these jars are at the odd sizes previously mentioned it will appear to hang, then after a while we will see the error messages above.
    Thanks

  • Location of jar download

    Hi guys,
    I assume this question is browser specific but can someone tell the file path where jar files are downloaded to?
    Many thanks,
    Alex

    I will explain my problem in more detail.
    We have a .msi file (a bunch of dll's) which contains our API. The API is a set of c++ COM interfaces. I need to use java to demo the API but... the demo must be embedded in a browser (that is why im using java).
    The solution I came up with was to have the COM bridge, the application files and the API msi packaged in a downloadable jar. The user would then download the jar file, the app would unpack the msi and run it and then the app would call the API methods.
    Therefore, I need a way of downloading the jar, extracting the msi and running it before I can use any of my API methods.
    I hope my explanation is clear, I can provide you with more info if needs be.
    Thanks for your help.

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

  • Split applet in multiple jars downloadable on demand

    What I'm trying to do is fairly simple, usual and a widespread practice in Flash/Flex/Silverlight. I need to split an applet in multiple modules, then download only the modules the users explicitly requests, and provide a preloader for each download. I think the best way to do this is to pack each module inside separate jar file, then download the jars I need on demand.
    But I'm lost. Does the JarURLConnection class provides a way to monitor the download progress of the jar? If not, then I have to use HttpURLConnection? Plus what? A little help please.

    Please refrain from [multi-posting|http://forums.sun.com/thread.jspa?threadID=5392215].
    A better way to achieve this application feature is to launch this applet using Webstart, and specify the other archives as 'lazy' download, then take active control of the downloads using the JNLP API's [DownloadService/Listener|http://pscode.org/jws/api.html#ds] to fetch the Jar's.
    This would mean the applet becomes free-floating (not embedded in the browser), unless the client has 1.6.0_10 or above, which then enables embedding Webstart based applets in a browser window.
    As an alternative to that - you might also 'roll your own' variant using URLConnection (or whatever) and wrapping the InputStream in a ProgressMonitorInputStream. But I cannot see that being made workable, short of a digitally signed (and trusted) applet, which seems like overkill for a simple 'quick on-screen, then progress monitor while rest of resources download' type scenario.

  • Jar downloading and Caching

    I have an application that runs on a couple of servers. It's an assessment engine, so you take a test and for each question you download a new jar. Each jar is about 50-500k.
    What i don't understand is that once the jars are cached, it still takes a significant amount of time to create the next question on our production environment. On staging and development it is much faster.
    Granted the production environment receives production traffic and downloading the jars the first time should be slower, but once the jars are cached, why would it still take a lot of time. Is there still that much interactivity between the servers checking the jars on the server? It seems to me that once the jars are cached from the staging environments and production environments, they should behave practically the same.
    Edited by: Brohonimo on Apr 16, 2010 10:54 AM

    Here is something curious....
    http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/applet_caching.html#algorithm
    Known Issues
    Caching of the .jar files specified in the manifest's Class-Path variable using Java Plug-in's cache is currently not supported.
    The path specified in the cache_archive must be a relative URL to the applet's codebase. Full URLs are not supported in cache_archive.
    * If you get the "java.io.IOException: Caching not supported for ..." exception, this is because Java Plug-in was unable to get the expiration and last-modification dates for a given JAR file from the web server. If the Java Plug-in cannot get this information, there is no point in caching since the JAR file will be downloaded every time it is used. Even with this exception, however, the applet should work fine. This exception is merely informative.
    Now I specify only the one jar in the archive section of the html, which contains a jar with the classpath to all the necessary jars in the manifest and and Index file as well.
    Each new jar shows up in the java cache and the console itself refers to the jar in the cache....
    Reading certificates from 11 http://blahblahblah.jar | C:\Documents and Settings\dude\Application Data\Sun\Java\Deployment\cache\6.0\20\61ee19d4-232a6a61.idx
    Is it possibly downloading the jar every time to the cache?

  • TerminalIO.jar Download

    hello
    Does anyone know where do download the terminalIO.jar file? I've tried all the major search engines and got nothing.
    Thanks

    That's funny. I typed "TerminalIO.jar" into Google, got lots of references, clicked on the very first one, found a page about a textbook, and that had a link to this:
    http://faculty.cs.wwu.edu/martin/Software%20Packages/BreezySwing/Default.htm

  • OTA Error code 37 ( jar downloading problem)

    Hi all,
    I am new to j2me and recently creates an apps ..my apps works fine on OTA Provisioning if default url is used for downloading jad/jar....but when i used tomcat server it gives an error while downloading jar file OTA error code 37...i have also configure the mime type in tomcat's web.xml file...and try differnt ways....but still problem not resolved....please anybody help me to remove this error...Thanx in advance
    -JPF

    Hi,
    did you add these 2 MIME types?
    application/java-archive - jar
    text/vnd.sun.j2me.app-descriptor - jad

  • Applet jar downloading

    Hi,
    As much as I understand, jars specified within the 'ARCHIVE' parameter of the APPLET tag are only downloaded when needed, i.e. a jar won't be dowloaded or at least not loaded into the classpath unless a class that's within it is being imported.
    I conclude that by watching the java console messages which dislay whenever a jar is downloaded...
    anyways, due to this behavior I occasionally run into flows that run really slowly because they import a class that's in a jar that wasn't yet downloaded... my question is whether there is anyway to tell the JVM to download in the background all jars specified in the ARCHIVE param ?
    clearly I could add a swingworker that does that in the background but the problem is that this won't be automatic, i.e. whenever i'll add a new jar to the classpath, i'll need to write another import in the swing worker so that this jar will also be downloaded....
    anyone ?
    thanks,
    Gil.

    As much as I understand, jars specified within the 'ARCHIVE' parameter of the APPLET tag are only downloaded when needed, i.e. a jar won't be dowloaded or at least not loaded into the classpath unless a class that's within it is being imported.That doesn't even make sense. How can Java know what's in the JAR file without downloading it?
    I suspect the truth is that Java downloads the JARS in the list in order whenever it needs a class it hasn't got yet, starting of course with the applet class itself and therefore the first JAR on the list.
    anyways, due to this behavior I occasionally run into flows that run really slowly because they import a class that's in a jar that wasn't yet downloaded... my question is whether there is anyway to tell the JVM to download in the background all jars specified in the ARCHIVE param?Combine the JAR files. But that will slow down the initial loading of course. Lazy loading is an optimization, normally a good idea.

  • Slow jar downloading with antivirus

    Hi all. A customer of my company has a trouble on some Windows XP 32 bit clients: the first downloading of the jars used by a jboss-based application takes a very long time. Client-side a java web start is used.
    Using an older version of the application, which is tomcat-based and uses applet technology, the effect is the same.  In both cases a JRE 6u18 is installed on client.
    This doesn't happen on Windows 7 64 bit clients.
    Removing the antivirus (TrendMicro OfficeScan, version 10.5) the download is much faster, so I would suggest the customer to exclude the java deployment folder.
    Someone having similar problems? In your opinion, is it a good idea?
    Any other suggestions?
    Thanks a lot

    You're not the only one to have seen this problem.
    I don't understand what you mean by excluding the Java deployment folder. Surely the application is saved to and then run from the cache folder.
    I don't have the answer. I don't know how you can reasonably whitelist one Java Web Start application/applet but continue to scan in the general case.
    McAfee suggest disabling scan within archives: https://kc.mcafee.com/corporate/index?page=content&id=KB58727 on the basis that each component file is scanned before it is extracted. Without understanding anything about antivirus, that sounds bogus to me: Java will execute the contents of a jar without unzipping and extracting them.

Maybe you are looking for