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

后端 未结 6 1178
挽巷
挽巷 2020-12-06 16:22

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

相关标签:
6条回答
  • 2020-12-06 16:48

    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 http://stackoverflow.com/questions/1517350/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
    
    0 讨论(0)
  • 2020-12-06 16:49

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

    0 讨论(0)
  • 2020-12-06 16:55

    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.

    0 讨论(0)
  • 2020-12-06 16:57

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

    0 讨论(0)
  • 2020-12-06 16:57

    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

    0 讨论(0)
  • 2020-12-06 17:05

    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.

    0 讨论(0)
提交回复
热议问题