Où se trouve les fichiers jar mises en cache pour les applications Java Web Start / JNLP?

StackOverflow https://stackoverflow.com/questions/1517350

  •  19-09-2019
  •  | 
  •  

Question

Où se trouve les fichiers jar mises en cache pour les applications Java Web Start / JNLP?

Était-ce utile?

La solution

Cela dépend ... de votre OS et la machine virtuelle, par exemple:.

  • avec un Sun JDK 1.5 et Windows XP: C:\Documents and Settings\userid\Application Data\Sun\Java\Deployment\cache\javaws\
  • avec un Sun JDK 1.6 et Vista: C:\Users\userid\AppData\LocalLow\Sun\Java\Deployment\cache\6.0
  • avec un Sun JDK 1.6 et GNU / Linux: /home/userid/.java/deployment/cache/6.0
  • avec un Sun JDK 1.6 et Mac OS X: ~/Library/Caches/Java/cache/6.0/

Avec cela peut être configuré via le panneau de configuration Java, Sun JDK 6 (Fichiers Internet temporaires Paramètres Général onglet).

Autres conseils

Sous Windows Vista ou 7, il est en %AppData%\LocalLow\Sun\Java\Deployment\cache.

pour ubuntu et d'autres distros linux à base de debian utilisant icedtea: /home/USER/.icedtea/cache

dans le cas où vous voulez juste vider le cache javaws -uninstall ne fonctionnera pas. javaws -Xclearcache fait le travail pour icedtea.

Il y a plus à jnlp que juste la mise en œuvre du Soleil.

Les paquets OpenJDK expédiés par Debain, par exemple, bundle netx, qui stocke ses fichiers ~/.netx/cache/. entrée de Wikipedia a une liste d'autres implémentations connues que Sun.

Vous devriez vraiment pas compter sur ce chemin étant bien connu dans le code de votre application.

Si vous êtes également intéressé par le contenu des pots dans le cache de JNLP vous voudrez peut-être utiliser le script suivant (testé sous Mac OS X) pour examiner les fichiers jar avec pot -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

Vous pouvez facilement visualiser ou effacer (désinstaller) vos applications Java Web Start. Cela peut être fait à l'aide du panneau de configuration Java comme décrit ci-dessous http: // www.. ngs.ac.uk/ukca/certificates/certwizard/clearwebstartcache

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top