Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaPróxima revisiónAmbos lados, revisión siguiente |
es:howtos:software:java [2019/08/22 14:44 (UTC)] – [Java (JDK) Installation on Slackware 14 and newer] slackwarespanol | es:howtos:software:java [2019/08/22 14:51 (UTC)] – [Sources] slackwarespanol |
---|
===== 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 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 two, either 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 dos, ya sea JRE o 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 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 cerrado. El 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 source, then use the [[http://slackware.com/~alien/slackbuilds/openjdk/build/README.txt|README]] for guidance. | Si decide que desea compilar OpenJDK desde el código fuente, utilice [[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 |
</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 line, that dot is the "source" command of the shell. | </code> Tenga en cuenta el carácter de punto al comienzo de la línea, ese punto es el comando "fuente" del 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]] |
<!-- 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}} |