[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
fr:howtos:software:java [2015/09/11 02:41 (UTC)] – créée cedricfr:howtos:software:java [2018/01/13 20:11 (UTC)] (Version actuelle) – [Java et Slackware] cedric
Ligne 1: Ligne 1:
 ====== Java et Slackware ====== ====== Java et Slackware ======
-<note important>TRADUCTION en cours</note>+
 ===== Oracle Java ===== ===== Oracle Java =====
  
-Due to recent changes in Oracle'Java licensing, Slackware, or any other distribution, is no longer allowed to distribute Java binary packages with the operating systemWhat it means for us is that although we will still be able to install Java on our system, as of Slackware 14 we will be required to manually download the binary package.+En raison des récents changement dans la licence de Oracle Java, Slackware, et toutes les autres distribution, n'ont plus l'autorisation de distribuer les binaires Java avec leur systèmeCela implique de télécharger manuellement les binaires sur notre système Slackware 14.
  
-Oracle offers two packages:+Oracle proprose deux installeurs:
  
-  * JRE (Java Runtime Environment) - required to run Java applications+  * JRE (Java Runtime Environment) - requis pour l'exécution d'applications Java. 
-  * JDK (Java Development Kit) - required to develop and run Java applications (it includes the JRE).+  * JDK (Java Development Kit) - requis pour le développement et l'exécution de programmes Java (il contient le JRE).
  
-As the JRE is included in the JDK, the Java Development Kit (JDK) is a recommended package to install.+Comme le Java Development Kit (JDK) contient le JRE, il est recommandé d'utiliser cet installeur.
  
-<note important>Please do NOT install both packages and make sure you remove any previously installed Java packages before you start the installation</note>+<note important>N'installez pas les deux et veillez à désinstaller les précédentes versions de Java avant de commencer l’installation d'une nouvelle version.</note>
  
-==== Java (JDK) Installation on Slackware 14 and newer ====+==== Installation de Java (JDK) sur Slackware 14 et supérieure ====
  
-Follow the steps below to install Java on your system:+Suivez les étapes ci-dessous pour installer Java sur votre système:
  
-1. Visit the official [[http://www.oracle.com/technetwork/java/javase/downloads/index.html|download page]].+1. Visitez la [http://www.oracle.com/technetwork/java/javase/downloads/index.html|page de téléchargement]] du site officiel.
  
-2. Right under //Java Platform, Standard Edition// click the //JDK Download// and accept the license agreement.+2. Sous //Java Platform, Standard Edition// cliquez sur //JDK Download// et accepter la licence.
  
-3. Download a binary package that is appropriate for your architecture:+3. Téléchargez le binaire correspondant à votre architecture:
  
-''Linux x86'' for a 32-bit version of Slackware.\\ +''Linux x86'' pour une version Slackware 32-bit.\\ 
-''Linux x64'' for a 64-bit version of Slackware.+''Linux x64'' pour une version Slackware 64-bit.
  
-Make sure you have chosen the **.tar.gz** version.+Veillez à sélectionner la version **.tar.gz**.
  
-At the time of writing thisthe latest version (64-bitwas:+A la rédaction de ceta rticlela dernière version (64 bitsest:
  
 <code>jdk-7u7-linux-x64.tar.gz</code> <code>jdk-7u7-linux-x64.tar.gz</code>
  
-4. In a terminal log in as root:+4. Dans une fenêtre de terminal, loggez vous en root:
  
 <code>su -</code> <code>su -</code>
  
-5. Go to the ''/extra/source/java'' directory on a Slackware installation DVD or change to the local directory if you downloaded it from a Slackware mirror (in which case, //don't forget to download **all** the files and subdirectories in that "''java''"directory!//).+5. Allez dans le répertoire ''/extra/source/java'' du DVD d’installation de la Slackware ou placez-vous dans le répertoire dans lequel vous téléchargé le binaire si vous l'avez téléchargé depuis un site miroir, auquel cas, //N'oubliez pas de télécharger **tous** les fichiers du sous-répertoire "''java''"!//).
  
-6. Run the java SlackBuild specifying the path to the downloaded Java binary package.+6. Exécuter le SlackBuild java en indiquant l'emplacement du binaire Java que vous avez téléchargé.
  
 <code>./java.SlackBuild /path/to/jdk-7u7-linux-x64.tar.gz</code> <code>./java.SlackBuild /path/to/jdk-7u7-linux-x64.tar.gz</code>
  
-Once the SlackBuild finishes, you should get similar message:+Quand le SlackBuild a terminé, vous devriez avoir un message du genre:
  
 <code>Slackware package /tmp/jdk-7u7-x86_64-1.txz</code> <code>Slackware package /tmp/jdk-7u7-x86_64-1.txz</code>
  
-<note>If you get the following message, you can disregard it.\\ //WARNING:  zero length file usr/lib64/java/lib/security/trusted.libraries//</note>+<note>Si vous obtenez ce message, vous pouvez l'ignorer.\\ //ATTENTION:  le fichier usr/lib64/java/lib/security/trusted.libraries à une taille nulle//</note>
  
-7. Install the newly created package:+7. Installez le nouveau paquet nouvellement créé:
  
 <code>upgradepkg --install-new /tmp/jdk-7u7-x86_64-1.txz</code> <code>upgradepkg --install-new /tmp/jdk-7u7-x86_64-1.txz</code>
  
-8. Restart a web browser and try if Java has been detected by visiting the following [[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 binariesthen 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'Oraclevous 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 twoeither 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 versionssoit JRE, soit JDK!// 
-If you want a web-browser plugin like Oracle's binaries havethen install the additional [[http://slackware.com/~alien/slackbuilds/icedtea-web|icedtea-web]] package. Oracle kept its browser plugin closed-sourceThe //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étaireLe 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 =====
  
-HelpI installed Java but when I try to use it, I get "command not found"!+Au secoursJ'ai installé Java mais j'obtiens "commande introuvablelorsque 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 useone of these is executed whenever you loginThe profile script adds the Java directory to the $PATH variable (so that you can start the ''java'' commandand 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 connectezLe 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 packageyou need to logout and login again in order to load the Java profile script. If it is inconvenient to logout right nowthere 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 JavaSi vous ne pouvez pas vous déconnecteril 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 linethat dot is the "source" command of the shell.+</code> Attention au point en début de lignece point est l'équivalent de la commande "source" du shell.
  
  
Ligne 95: Ligne 95:
  
 <!-- 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 }}
 fr:howtos:software:java ()