This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "delete JRE cache" Watch "delete JRE cache" New topic
Author

delete JRE cache

manu chaox
Ranch Hand

Joined: Apr 10, 2006
Posts: 110
Hi,
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: 685
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
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
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.


Ping & DNS - my free Android networking tools app
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)...it 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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: delete JRE cache
 
Similar Threads
refresh problem
error message
MY swing database application can not connect
Class loaders
Add Image on to JFrame in jar file