Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa |
es:howtos:software:java [2019/08/22 14:47 (UTC)] – [OpenJDK] slackwarespanol | es:howtos:software:java [2019/08/22 14:52 (UTC)] (actual) – [Fuentes] slackwarespanol |
---|
<note warning>Por traducir - [[wiki:user:slackwarespanol|Victor]] | |
</note> | |
====== Java en Slackware ====== | ====== Java en Slackware ====== |
| |
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. | 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 not found after installation ===== | ===== Java no encontrado después de la instalación ===== |
| |
Help! I installed Java but when I try to use it, I get "command not found"! | ¡Ayuda! Instalé Java, pero cuando trato de usarlo, aparece "command not found". |
| |
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). | 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). |
| |
Here follows the content of such a script on 64-bit Slackware: <code> | Aquí sigue el contenido de tal script en Slackware de 64 bits: <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]] 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}} |