Where is the jar files cached for Java Web Start/JNLP applications?
Asked Answered
S

6

22

Where is the jar files cached for Java Web Start/JNLP applications?

Sabelle answered 4/10, 2009 at 20:49 Comment(1)
At least in Windows, it will not store the jar with the original name (not even with .jar file extension). Check the time stamp and file size to get your requested jar files.Mutinous
U
28

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).

Undersecretary answered 4/10, 2009 at 20:56 Comment(0)
W
10

On Windows Vista or 7, it's in %AppData%\LocalLow\Sun\Java\Deployment\cache.

Warhead answered 4/10, 2009 at 20:56 Comment(2)
It is worth mentioning that the file extension is not jar. So, you may check the file size and find it somehow.Buntline
Don't works but %HOMEPATH%\appdata\LocalLow\Sun\Java\Deployment\cache is ok. %AppData% go to %HOMEPATH%\appdata\RoamingKayseri
S
3

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.

Shreve answered 4/10, 2009 at 21:14 Comment(1)
If you happen to be using netx.jar from icedteaweb you can specify ` -Xclearcache` command line paramLawrencelawrencium
V
3

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.

Varipapa answered 22/7, 2012 at 20:58 Comment(0)
F
1

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
Foment answered 30/3, 2016 at 17:11 Comment(0)
L
0

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

Lisk answered 19/1, 2015 at 14:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.