Tech Per

25 Aug

Applet Caching and the Control Panel on Linux

The Sun Java applet plugin will cache applets outside the browser cache, in its own cache directory. Clearing the cache in the browser will not clear the applet cache, which can be irritating when you need to be sure, that a fresh copy of a given applet is loaded.

What you need to do, is clear the cache through the Java Control Panel, which can be hard to locate on Linux (on Windows it is placed in Control Panel->Java). Depending on your distro and how Java was installed, you might be lucky and find a link to the Control Panel inside the menues somewhere (like in System->Preferences or something like that).

When installing Java manually with a tar.gz, and the Sun Java Plugin manually by this method, where you yourself symbolic link from the the plugins directory to the JRE Java Plugin .so file, finding the Control Panel can be harder.

Luckily, if you know what to look for, it ain’t hard at all.

Inside either the SDK bin directory or inside the JRE bin directory, you will find a binary named ControlPanel (actually, it is a shell script, but whatever). Executing this yields this:

And clicking the “Delete files” button will let you delete applets (and Java Web Start applications installed/cached).

In addition, clicking “Settings” will show you where the cache is placed ($HOME/.java/…), which makes it easy for you to clear the cache later with a simple remove.

As a little side-note. When developing or debugging applets, it can be nice to have the Java Plugin console window open when the plugin loads. This can be enabled in the Control Panel, on the “Advanced” tab, like this:

Leave a Reply

© 2009 Tech Per | Entries (RSS) and Comments (RSS)

GPS Reviews and news from GPS Gazettewordpress logo