i have a java applet in one html page, later, i modified the java code and regenerate the jar file. all i did is copy the jar file to my web server and brought up the browser to see the updated the appplet, but it still showed the old version. i tried refresh the browser, delete the cookies, still the same. i tried to open that html file by double clicking the file, it open it in browser with the right applet...i deployed the applet with jnlp. anyone knows what might go wrong? Thanks.
3 Answers
Go to the Java control panel and clear the Java caches*. The Java plugin does not use your browser for downloading Jar files.
*: Temporary internet files - configuration - delete files

- 2,230
- 14
- 34

- 44,698
- 7
- 80
- 103
Try this to clear the cache quickly without having to go through the tedious process of opening the Control Panel:
Open up the Java Console:
Windows: http://www.java.com/en/download/help/javaconsole.xml Use method 2.
Linux: http://www.java.com/en/download/help/enable_console_linux.xml
And I can't insert a third hyperlink for Macintosh because I don't have enough reputation points yet......
Press 'x' to clear the cache!
I hope this works!

- 5,113
- 1
- 27
- 38
Jonathan's answer should do the trick, but in future I recommend you to load the applet from a new URL each time you update. For example http://www.domain.com/applet.jar?version=x

- 11,999
- 14
- 68
- 78
-
How would you do this in an ` – BalusC Feb 22 '10 at 13:24
-
@BalusC, the optimum way of deploying applets can get convoluted. Previous I asked about the best method http://stackoverflow.com/questions/1028900/what-is-the-rolls-royce-way-to-deploy-a-java-applet but I would recommend using a version unique URL regardless of deployment technique. – Pool Feb 22 '10 at 14:17
-
I mean.. **Where** would you add the query string? Here? `archive="Foo.jar?version=1"` – BalusC Feb 22 '10 at 14:34
-
Ohana was interested in JNLP so it would be `
`. The way I do it for non-JNLP is slightly different: I use `codebase="buildNumber"` and `archive="applet.jar"`. I find this is neater and trivial to automate with `ant`. – Pool Feb 22 '10 at 15:00