java - Applet does not cache jar files -
i'm having issues identifying why few heavy .jar files not being cached @ client side.
the applet runs fine, lazy-downloads heavy jar libs on every run (specifically aws-java-sdk , xuggler)
the applet:
is applied html dom javascript
<applet archive="myscreencast.jar" code="srcapplet.class" codebase="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/" height="50" width="130"> <param name="cache_archive" value="lib/swing-layout-1.0.4.jar, lib/slf4j-api-1.6.4.jar, lib/slf4j-jcl-1.6.4.jar, lib/xuggle-xuggler-noarch-5.4.jar, lib/aws-java-sdk-1.4.0.jar, lib/commons-codec-1.3.jar, lib/commons-logging-1.1.1.jar, lib/httpclient-4.1.1.jar, lib/httpcore-4.1.jar, lib/xuggle-xuggler-arch-x86_64-w64-mingw32.jar, lib/xuggle-xuggler-arch-x86_64-xuggle-darwin11.jar, lib/xuggle-xuggler-arch-x86_64-pc-linux-gnu.jar"> <param name="cache_version" value="1.0, 1.4.0, 1.3, 1.1.1, 4.1.1, 4.1, 1.6.4, 5.4.0"> <param name="jnlp_href" value="http://beta.remoting.io/screencasts/118/launch.jnlp"> <param name="outputfilename" value="filename.mp4"> <param name="token" value="secrettoken"> <param name="image" value="http://djebp0fi6w5vu.cloudfront.net/assets/ajax-loader-40b35ac3503bcb1279f0851d57d2b62a.gif"> <param name="name" value="myscreencast"> </applet> launch.jnlp
headers:
http/1.1 200 ok cache-control: max-age=0, private, must-revalidate content-type: application/x-java-jnlp-file; charset=utf-8 date: thu, 18 apr 2013 06:51:43 gmt etag: "0acc9670f5347a89063c1ad76ba6a931" status: 200 ok x-rack-cache: miss x-request-id: b26b35dc9b336fd42da4f2bf0403b58c x-runtime: 0.261893 x-ua-compatible: ie=edge,chrome=1 connection: keep-alive response:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <jnlp href="/screencasts/118/launch.jnlp" spec="1.0+"> <information> <title>myscreencast</title> <vendor>dotg</vendor> <homepage href="/screencasts/118/launch.html"/> <description>myscreencast</description> <description kind="short">myscreencast</description> </information> <update check="always"/> <security> <all-permissions/> </security> <resources> <j2se java-vm-args="-djava.security.policy=http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/applet.policy" version="1.6+"/> <jar href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/myscreencast.jar" main="true"/> <resources arch="x86_64" os="windows"> <nativelib href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/xuggle-xuggler-arch-x86_64-w64-mingw32.jar"/> </resources> <resources arch="x86_64" os="mac os x"> <nativelib href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/xuggle-xuggler-arch-x86_64-xuggle-darwin11.jar"/> </resources> <resources arch="x86_64" os="linux"> <nativelib href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/xuggle-xuggler-arch-x86_64-pc-linux-gnu.jar"/> </resources> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/swing-layout-1.0.4.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/slf4j-api-1.6.4.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/slf4j-jcl-1.6.4.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/xuggle-xuggler-noarch-5.4.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/aws-java-sdk-1.4.0.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/commons-codec-1.3.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/commons-logging-1.1.1.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/httpclient-4.1.1.jar"/> <jar download="lazy" href="http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/httpcore-4.1.jar"/> </resources> <applet-desc height="32" main-class="com.dotg.screencast.scrapplet" name="myscreencast" width="32"> <param name="token" value="secrettoken"/> <param name="outputfilename" value="somefilename.mp4"/> </applet-desc> </jnlp> .jar files
header:
$ curl -i http://s3.amazonaws.com/remoting-io-cdn/recorder/v3/lib/aws-java-sdk-1.4.0.jar http/1.1 200 ok x-amz-id-2: +vvx4kaqf4o+aq+tdzllcy8amxcaytp739zcttwyfxryk3ljgg9xnz0nertt8+cu x-amz-request-id: d16687ef72e5f892 date: thu, 18 apr 2013 18:17:12 gmt cache-control: public, max-age=31557600 last-modified: thu, 18 apr 2013 13:18:48 gmt etag: "f577609185df722d54e85b822dbd043c" accept-ranges: bytes content-type: application/x-java-archive content-length: 10293926 server: amazons3 why .jar files not cached?
javaws has options investigate caching.
in particular, run javaws -viewer
java web start: usage: javaws [run-options] <jnlp-file> javaws [control-options] run-options include: -verbose display additional output -offline run application in offline mode -system run application system cache -xnosplash run without showing splash screen -j<option> supply option vm -wait start java process , wait exit control-options include: -viewer show cache viewer in java control panel -clearcache remove non-installed applications cache -uninstall remove applications cache -uninstall <jnlp-file> remove application cache -import [import-options] <jnlp-file> import application cache import-options include: -silent import silently (with no user interface) -system import application system cache -codebase <url> retrieve resources given codebase -shortcut install shortcuts if user allowed prompt -association install associations if user allowed prompt
Comments
Post a Comment