[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

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
es:howtos:software:java [2019/08/21 00:54 (UTC)] – [Java in Slackware] slackwarespanoles:howtos:software:java [2019/08/22 14:52 (UTC)] (actual) – [Fuentes] slackwarespanol
Línea 1: Línea 1:
-<note warning>Por traducir - [[wiki:user:slackwarespanol|Victor]] + 
-</note> + 
-====== Java in Slackware ======+====== Java en Slackware ======
  
 ===== Oracle Java ===== ===== Oracle Java =====
  
-Due to recent changes in Oracle's 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 systemas of Slackware 14 we will be required to manually download the binary package.+Debido a los cambios recientes en las licencias Java de Oracle, Slackware o cualquier otra distribución ya no puede distribuir paquetes binarios Java con el sistema operativoLo que significa para nosotros es que, aunque todavía podremos instalar Java en nuestro sistemaa partir de Slackware 14 se nos solicitará que descarguemos manualmente el paquete binario.
  
-Oracle offers two packages:+Oracle ofrece dos paquetes:
  
-  * JRE (Java Runtime Environment) - required to run Java applications+   * JRE (Java Runtime Environment): requerido para ejecutar aplicaciones Java. 
-  * JDK (Java Development Kit) - required to develop and run Java applications (it includes the JRE).+   * JDK (Kit de desarrollo de Java): necesario para desarrollar y ejecutar aplicaciones Java (incluye el JRE).
  
-As the JRE is included in the JDK, the Java Development Kit (JDK) is a recommended package to install.+Como el JRE está incluido en el JDK, el Kit de desarrollo de Java (JDK) es un paquete recomendado para instalar.
  
-<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>NO instale ambos paquetes y asegúrese de eliminar los paquetes Java previamente instalados antes de comenzar la instalación</note>
  
-==== Java (JDK) Installation on Slackware 14 and newer ====+==== Instalación de Java (JDK) en Slackware 14 y posteriores ====
  
-Follow the steps below to install Java on your system:+Siga los pasos a continuación para instalar Java en su sistema:
  
-1. Visit the official [[http://www.oracle.com/technetwork/java/javase/downloads/index.html|download page]].+1. Visite la [[http://www.oracle.com/technetwork/java/javase/downloads/index.html|download page]] oficial.
  
-2. Right under //Java Platform, Standard Edition// click the //JDK Download// and accept the license agreement.+2. Justo debajo de // Java Platform, Standard Edition // haga clic en // JDK Download // y acepte el acuerdo de licencia.
  
-3. Download a binary package that is appropriate for your architecture:+3. Descargue un paquete binario que sea apropiado para su arquitectura:
  
-''Linux x86'' for a 32-bit version of Slackware.\\ +'' Linux x86 '' para una versión de 32 bits de Slackware. \\ 
-''Linux x64'' for a 64-bit version of Slackware.+'' Linux x64 '' para una versión de Slackware de 64 bits.
  
-Make sure you have chosen the **.tar.gz** version.+Asegúrese de haber elegido la versión **. tar.gz **.
  
-At the time of writing thisthe latest version (64-bitwas:+Al momento de escribir estola última versión (64 bitsera:
  
 <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. En un terminal, inicie sesión como 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. Vaya al directorio '' /extra/source/java '' en un DVD de instalación de Slackware o cambie al directorio local si lo descargó desde un mirror de Slackware (en cuyo caso, // ¡no olvide descargar ** todos ** los archivos y subdirectorios en ese directorio "'' java ''"! //).
  
-6. Run the java SlackBuild specifying the path to the downloaded Java binary package.+6. Ejecute Java SlackBuild especificando la ruta al paquete binario Java descargado.
  
 <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 finishesyou should get a similar message:+Una vez que finalice el SlackBuild, debería recibir un mensaje similar:
  
 <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 messageyou can disregard it.\\ //WARNING zero length file usr/lib64/java/lib/security/trusted.libraries//</note>+<note>Si recibe el siguiente mensajepuede ignorarlo. \\ // ADVERTENCIAarchivo de longitud cero usr /lib64/java/lib/security/trusted.libraries//</note>
  
-7. Install the newly created package:+7. Instale el paquete recién creado:
  
 <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. Reinicie un navegador web e intente si se ha detectado Java visitando el siguiente [[http://www.java.com/en/download/installed.jsp|website]].
  
-9. You may need to reboot the computer for the system to recognize Java:+9. Es posible que deba reiniciar la computadora para que el sistema reconozca Java:
  
 <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 desea que [[es:slackware: slackpkg | slackpkg]] ignore los paquetes jre jdk en clean-system, agréguelos a la lista negra en '' /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 sourcesSlackBuild scripts and/or native Slackware packages here: [[http://slackware.com/~alien/slackbuilds/openjdk/|http://slackware.com/~alien/slackbuilds/openjdk/]].+Si prefiere la alternativa de código abierto completo de OpenJDK en lugar de los binarios precompilados y parcialmente cerrados de Oracle, puede obtener fuentes, scripts de SlackBuild y/o paquetes nativos de Slackware aquí: [[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 decide que desea usar OpenJDK, se aplican las mismas reglas que se escribieron anteriormente para los paquetes de Oracle Java: // ¡solo instale uno de los dosya sea JRE 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 desea un complemento de navegador web como los binarios de Oracle, instale el paquete adicional [[http://slackware.com/~alien/slackbuilds/icedtea-web|icedtea-web]]. Oracle mantuvo su complemento de navegador de código cerradoEl paquete // icedtea-web // es una alternativa de código abierto. \\ También necesitará [[http://slackware.com/~alien/slackbuilds/rhino|rhino]], el motor de JavaScript para OpenJDK.
  
-If you decide you want to compile OpenJDK from sourcethen use the [[http://slackware.com/~alien/slackbuilds/openjdk/build/README.txt|README]] for guidance.+Si decide que desea compilar OpenJDK desde el código fuenteutilice [[http://slackware.com/~alien/slackbuilds/openjdk/build/README.txt|README]] como guía.
  
 +===== Java no encontrado después de la instalación =====
  
-===== Java not found after installation =====+¡Ayuda! Instalé Java, pero cuando trato de usarlo, aparece "command not found".
  
-Help! I installed Java but when I try to use it, I get "command not found"!+Lo que necesita saber es que el paquete Java instala dos archivos en su directorio de perfil "'' /etc/profile.d/ ''". Según el shell de inicio de sesión que utilice, uno de estos se ejecuta cada vez que inicia sesión. El script de perfil agrega el directorio Java a la variable $ PATH (para que pueda iniciar el comando '' java '') y establece la variable $ JAVA_HOME (necesaria para otros programas que intentan localizar su instalación de Java).
  
-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). +Aquí sigue el contenido de tal script en Slackware de 64 bits: <code>
- +
-Here follows the content of such a script on 64-bit Slackware: <code>+
 #!/bin/sh #!/bin/sh
 export JAVA_HOME=/usr/lib64/java export JAVA_HOME=/usr/lib64/java
Línea 88: Línea 87:
 </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> 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>
 . /etc/profile.d/openjdk.sh . /etc/profile.d/openjdk.sh
-</code> Note the dot character at the start of the linethat dot is the "sourcecommand of the shell. +</code> Tenga en cuenta el carácter de punto al comienzo de la líneaese punto es el comando "fuentedel shell. 
  
-====== Sources ====== 
-  * Original source: [[http://slackware.org.uk/slackware/slackware64-current/extra/java/README|java.SlackBuild readme]] 
-  * Contributions by [[wiki:user:sycamorex|sycamorex]] 
-  * Contributions by [[wiki:user:alienbob|Eric Hameleers]] 
  
 +====== Fuentes ======
 +   * Fuente original: [[http://slackware.org.uk/slackware/slackware64-current/extra/java/README|java.SlackBuild readme]]
 +   * Contribuciones de [[wiki: user: sycamorex | sycamorex]]
 +   * Contribuciones de [[wiki: user: alienbob | Eric Hameleers]]
 +   * Traducido por [[wiki: user: slackwarespanol | Víctor]]  2019/08/22 14:52 (UTC)
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 {{tag>howtos software java jdk jre author_sycamorex}} {{tag>howtos software java jdk jre author_sycamorex}}
 es:howtos:software:java ()