Where is the jar files cached for Java Web Start/JNLP applications?
It depends... on your OS and virtual machine, e.g.:
- with a Sun JDK 1.5 and Windows XP:
C:\Documents and Settings\userid\Application Data\Sun\Java\Deployment\cache\javaws\
- with a Sun JDK 1.6 and Vista:
C:\Users\userid\AppData\LocalLow\Sun\Java\Deployment\cache\6.0
- with a Sun JDK 1.6 and GNU/Linux:
/home/userid/.java/deployment/cache/6.0
- with a Sun JDK 1.6 and Mac OS X:
~/Library/Caches/Java/cache/6.0/
With a Sun JDK 6, this can be configured through the Java Control Panel (Temporary Internet Files Settings in the General tab).
On Windows Vista or 7, it's in %AppData%\LocalLow\Sun\Java\Deployment\cache
.
%HOMEPATH%\appdata\LocalLow\Sun\Java\Deployment\cache
is ok. %AppData% go to %HOMEPATH%\appdata\Roaming
–
Kayseri There is more to JNLP than just Sun's implementation.
The OpenJDK packages shipped by Debain, for instance, bundle netx, which stores its files in ~/.netx/cache/
. The Wikipedia entry has a list of known implementations other than Sun's.
You really shouldn't rely on this path being well-known in your application's code.
For ubuntu and other debian based linux distros using icedtea: /home/${USER}/.icedtea/cache
In case you want just to clear the cache javaws -uninstall
won’t work. javaws -Xclearcache
does the job for icedtea.
If you are also interested in the content of the jars in the JNLP cache you might want to use the following script (tested on Mac OS X) to examine the jar files with jar -tvf:
#!/bin/bash
# Author: WF
# see https://mcmap.net/q/573207/-where-is-the-jar-files-cached-for-java-web-start-jnlp-applications
os=`uname`
case $os in
# Mac OS X
Darwin*)
jnlpcache="$HOME/Library/Application Support/Oracle/Java/Deployment/cache/6.0"
;;
*)
echo "to make this script work for $os you might want to edit it" 1>&2
echo "and add a case option" 1>&2
echo "please copy your result back to the stackoverflow answer" 1>&2
exit 1
;;
esac
cd "$jnlpcache"
tmp="/tmp/jnlp$$"
for f in `find . -type f`
do
jar -tvf $f 2>/dev/null > $tmp
if [ $? -eq 0 ]
then
echo "found jar $f"
echo "it contains: "
cat $tmp
fi
done
rm $tmp
You can easily view or clear (uninstall) your Java WebStart applications. This can be done using the Java Control Panel as described below.http://www.ngs.ac.uk/ukca/certificates/certwizard/clearwebstartcache
© 2022 - 2024 — McMap. All rights reserved.