Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
fr:howtos:software:java [2015/09/11 14:36 (UTC)] – [Java (JDK) Installation on Slackware 14 and newer] traduction [fr] cedric | fr:howtos:software:java [2018/01/13 20:11 (UTC)] (Version actuelle) – [Java et Slackware] cedric |
---|
====== Java et Slackware ====== | ====== Java et Slackware ====== |
<note important>TRADUCTION en cours</note> | |
===== Oracle Java ===== | ===== Oracle Java ===== |
| |
8. Démarrez un navigateur web et vérifiez que Java est détecté en visitant le lien suivant [[http://www.java.com/en/download/installed.jsp|website]]. | 8. Démarrez un navigateur web et vérifiez que Java est détecté en visitant le lien suivant [[http://www.java.com/en/download/installed.jsp|website]]. |
| |
9. You may need to reboot the computer for the system to recognize Java: | 9. Vous devrez redémarrer votre machine pour que l'instalaltion de Java soit pris en compte: |
| |
<code>$ which java | <code>$ which java |
/usr/lib64/java/bin/java</code> | /usr/lib64/java/bin/java</code> |
| |
10. If you want [[slackware:slackpkg|slackpkg]] to ignore the jre and jdk packages on clean-system, add them to the blacklist in ''/etc/slackpkg/blacklist'' | 10. Si vous voulez que [[slackware:slackpkg|slackpkg]] ignore les paquets jre et jdk lors d'un clean-system, ajoutez les à la liste noire ''/etc/slackpkg/blacklist'' |
| |
| |
===== OpenJDK ===== | ===== OpenJDK ===== |
| |
If you prefer the fully Open Source alternative of OpenJDK instead of Oracle's pre-compiled and partly closed-source binaries, then you can get sources, SlackBuild scripts and/or native Slackware packages here: [[http://slackware.com/~alien/slackbuilds/openjdk/|http://slackware.com/~alien/slackbuilds/openjdk/]]. | Si vous ne souhaitez pas utiliser les binaires précompilés et partiellement propriétaire d'Oracle, vous pouvez utiliser la version Opensource d'OpenJDK. Les sources, scripts SlackBuild et/ou les paquets natifs Slackware sont disponibles ici : [[http://slackware.com/~alien/slackbuilds/openjdk/|http://slackware.com/~alien/slackbuilds/openjdk/]]. |
| |
If you decide you want to use OpenJDK, the same rules apply that were written above for the Oracle Java packages: //only install one of the two, either JRE or JDK!// | Si vous décidez d'utiliser OpenJDK, suivez les mêmes règles qu'au chapitre précédent: //N'installez qu'une seule des deux versions, soit JRE, soit JDK!// |
If you want a web-browser plugin like Oracle's binaries have, then install the additional [[http://slackware.com/~alien/slackbuilds/icedtea-web|icedtea-web]] package. Oracle kept its browser plugin closed-source. The //icedtea-web// package is an open-source alternative.\\ You will also need [[http://slackware.com/~alien/slackbuilds/rhino|rhino]], the JavaScript engine for OpenJDK. | Si vous avez besoin d'un plugin pour votre navigateur comme dans le binaire Oracle, alors installez le paquet additionnel [[http://slackware.com/~alien/slackbuilds/icedtea-web|icedtea-web]]. Oracle ne propose son plugin qu'en version propriétaire. Le paquet //icedtea-web// est une alternative open-source.\\ Vous aurez également besoin de [[http://slackware.com/~alien/slackbuilds/rhino|rhino]], le moteur JavaScript pour OpenJDK. |
| |
If you decide you want to compile OpenJDK from source, then use the [[http://slackware.com/~alien/slackbuilds/openjdk/build/README.txt|README]] for guidance. | Si vous décidez de compiler OpenJDK depuis le code source, lisez le [[http://slackware.com/~alien/slackbuilds/openjdk/build/README.txt|README]] à titre indicatif. |
| |
| |
===== Java not found after installation ===== | ===== Java introuvable après installation ===== |
| |
Help! I installed Java but when I try to use it, I get "command not found"! | Au secours! J'ai installé Java mais j'obtiens "commande introuvable" lorsque j'essaie de l'utiliser! |
| |
What you need to know is that the Java package installs two files in your profile directory "''/etc/profile.d/''". Depending on which login shell you use, one of these is executed whenever you login. The profile script adds the Java directory to the $PATH variable (so that you can start the ''java'' command) and sets the $JAVA_HOME variable (needed by other programs that try to locate your Java installation). | Ce que vous devez savoir, c'est que le paquet Java copie deux fichiers dans le répertoire de profile "''/etc/profile.d/''". En fonction de votre login shell, l'un des fichiers est utilisé lorsque vous vous connectez. Le script de profile ajoute le répertoire Java à votre variable $PATH (pour que vous puissiez lancer la commande ''java'') et configure la variable $JAVA_HOME (nécessaire aux autres programmes qui essaie de localiser votre installation Java). |
| |
Here follows the content of such a script on 64-bit Slackware: <code> | Voici le contenu de ce genre de script sur une installation Slackware 64 bits: <code> |
#!/bin/sh | #!/bin/sh |
export JAVA_HOME=/usr/lib64/java | export JAVA_HOME=/usr/lib64/java |
export MANPATH="${MANPATH}:${JAVA_HOME}/man" | export MANPATH="${MANPATH}:${JAVA_HOME}/man" |
export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" | export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" |
</code> This means that right after installing the Java package, you need to logout and login again in order to load the Java profile script. If it is inconvenient to logout right now, there is an alternative: you can "//[[wp>Dot_(Unix)|source]]//" the script by running the following command in your console, or in every terminal where you want to use Java without logging out and in again (example for OpenJDK and a bash-compatible shell): <code> | </code> Ce qui signifie qu'après l'installation du paquet Java, vous aurez besoin de vous déconnecter puis de vous reconnecter afin d'exécuter le script du profil Java. Si vous ne pouvez pas vous déconnecter, il existe une alternative: vous pouvez "//[[wp>Dot_(Unix)|source]]//" le script en exécutant la commande suivante dans votre console ou dans n'importe quel terminal depuis lequel vous souhaitez utiliser Java sans suivre le processus de déconnexion/reconnexion (par exemple pour OpenJDK et un shell compatible bash): <code> |
. /etc/profile.d/openjdk.sh | . /etc/profile.d/openjdk.sh |
</code> Note the dot character at the start of the line, that dot is the "source" command of the shell. | </code> Attention au point en début de ligne, ce point est l'équivalent de la commande "source" du shell. |
| |
| |
| |
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> |
{{tag>translation_in_progress fr:howtos software java jdk jre author_sycamorex translator_cedric }} | {{tag>fr:howtos software java jdk jre author_sycamorex translator_cedric }} |