File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes delete JRE cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "delete JRE cache" Watch "delete JRE cache" New topic

delete JRE cache

manu chaox
Ranch Hand

Joined: Apr 10, 2006
Posts: 110
is it possible to clear JRE cache by the code?
I ran(from code) example.jar and after that I have created new example.jar but it runs always first jar.

Could you help me please?
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 694
I think there must be some other problem. If the old jar still exists, can you rename it so that it wouldn't be found? Then create the new one. I suspect that there is a problem creating the new one or the new one is being written to some other folder.
If you create a new jar and issure the java -jar <jarfile> command in the correct folder, java won't go find the old version.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Are you talking about the jar file cache kept by the Java Plugin, in other words, applets or JWS applications? If so, check out the Java Plugin control panel; it has several settings for jar file caching, amongst them the option to turn it off completely.
manu chaox
Ranch Hand

Joined: Apr 10, 2006
Posts: 110
two app : ( any JWS, any aplet)

1st app run and download else 2nd app (f.e.:example.jar) always in certain interval from server.
2nd app is immidiately running after downloading.

If example.jar changes on server it won't change running example.jar(after downloading) run always old example.jar(probably some cache). (But example.jar is downloaded right.)

(1st app don't exit - always running. But if I exit 1st app and run it again it will run right example.jar.)

[ July 29, 2008: Message edited by: manu chaox ]
[ July 29, 2008: Message edited by: manu chaox ]
I agree. Here's the link:
subject: delete JRE cache
It's not a secret anymore!