Clear Java Cache

I want to know how you can clear your Java Cache using Java Code or CMD Line code.

This should be done on a Microsoft Windows computer anywhere, starting with Windows 7 and above.

This must be done on multiple computers so that the file paths are different.

The application uses Javaw as the default application with which it starts (not to be confused with Javaws or Webstart - I already have code to clear the Javaws cache). So I need to know how to clear the Javaw cache.

+5
source share
3 answers

You can do this using the Java Control Panel .

How to clear Java cache?

How to do this on the command line?

javaws -clearcache // Remove all non-installed applications from the cache.

javaws -uninstall // Remove all applications from the cache.
0

: javaws -Xclearcache -silent -Xnosplash

0

, Java:

  1. , Java Webstart . javaws javaws Java, @RuchiraGayanRanaweera.

    javaws, javaws - .

  2. Java Object Cache, J2EE Oracle ( OC4J). OC4J: " 9 - Java Object Cache". ( , , .)

  3. JVM , JVM. IBM Java Eclipse OpenJ9 ; , . " ".

    () Oracle OpenJDK Java. /, -, JVM , Java 5, ( Java 8), . ...

UPDATE - Starting with Java 10, the Oracle JVM and OpenJDK now support Data Sharing (CDS). This document contains instructions on how to recover the cache from the command line.


Given the context in which this question was originally asked, I suspect that the OP actually (was) actually asks about caching Java Webstart applications, but does not understand that this functionality is part of Java Webstart, and not Java SE as a whole.

0
source

All Articles