Java - Instalación NetBeans en Centos 7

 
Vista:
sin imagen de perfil
Val: 4
Ha aumentado su posición en 6 puestos en Java (en relación al último mes)
Gráfica de Java

Instalación NetBeans en Centos 7

Publicado por Xo (3 intervenciones) el 21/02/2019 20:46:16
Instale Netbeans en Centos 7 utilizando la guia: https://www.tecmint.com/install-netbean ... os-fedora/ pero no lo puedo utilizar porque no encuentra el path de java:

Realicé las siguientes verificaciones:

$ which java
/usr/bin/java

$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

$ java -showversion Test
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

Error: Could not find or load main class Test

$ find / -name 'java' –print
/etc/pki/ca-trust/extracted/java
/etc/pki/java
/etc/java
/etc/alternatives/java
/var/lib/alternatives/java

NetBeans se encuentra instalado en el directorio: “/usr/local/netbeans-8.2, aquí se encuentran los directorios:
-rw-r--r-- 1 root root 249450 Sep 29 2016 THIRDPARTYLICENSE.txt
-rw-r--r-- 1 root root 5454 Sep 29 2016 README.html
-rw-r--r-- 1 root root 17890 Sep 29 2016 netbeans.css
-rw-r--r-- 1 root root 40771 Sep 29 2016 LICENSE.txt
-rw-r--r-- 1 root root 4252 Sep 29 2016 CREDITS.html
-rw-r--r-- 1 root root 42571 Sep 29 2016 moduleCluster.properties
drwxr-xr-x 8 root root 125 Feb 19 15:36 platform
drwxr-xr-x 2 root root 72 Feb 19 15:36 etc
drwxr-xr-x 2 root root 61 Feb 19 15:36 bin
drwxr-xr-x 7 root root 114 Feb 19 15:37 ide
drwxr-xr-x 11 root root 4096 Feb 19 15:37 harness
drwxr-xr-x 8 root root 4096 Feb 19 15:37 nb
-rwxr-xr-x 1 root root 1701888 Feb 19 15:37 uninstall.sh
drwxr-xr-x 6 root root 103 Feb 19 15:37 extide
drwxr-xr-x 5 root root 93 Feb 19 15:37 websvccommon
drwxr-xr-x 5 root root 93 Feb 19 15:37 javafx
drwxr-xr-x 10 root root 4096 Feb 19 15:37 java
drwxr-xr-x 6 root root 103 Feb 19 15:37 apisupport
drwxr-xr-x 8 root root 136 Feb 19 15:37 profiler
drwxr-xr-x 7 root root 117 Feb 19 15:37 mobility
drwxr-xr-x 12 root root 4096 Feb 19 15:37 webcommon
drwxr-xr-x 7 root root 114 Feb 19 15:38 enterprise
drwxr-xr-x 9 root root 144 Feb 19 15:38 php
drwxr-xr-x 6 root root 103 Feb 19 15:38 cnd
drwxr-xr-x 5 root root 93 Feb 19 15:38 cndext
drwxr-xr-x 6 root root 103 Feb 19 15:38 dlight
drwxr-xr-x 5 root root 93 Feb 19 15:38 groovy
drwxr-xr-x 5 root root 75 Feb 19 15:38 ergonomics
Ejecuto NetBeans:
$ ./netbeans
Cannot find java. Please use the --jdkhome switch

/usr/local/netbeans-8.2/profiler/lib/deployed/jdk15

Modifique la línea de netbeans_jdkhome al archivo netbeans.conf localizado en:
/usr/local/netbeans8.2/etc/netbeans.conf

netbeans_jdkhome="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64"

Pero envía el mensaje:

Cannot find java. Please use the --jdkhome switch
$ whereis java
java: /usr/bin/java /usr/lib/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz

Les agradeceré su gran apoyo.
Gracias y respetos para Ustedes.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Billy Joel
Val: 2.665
Oro
Ha mantenido su posición en Java (en relación al último mes)
Gráfica de Java

Instalación NetBeans en Centos 7

Publicado por Billy Joel (876 intervenciones) el 21/02/2019 21:24:30
creo que tienes que definir una variable de entorno que se llama jdkhome con la dirección donde está la instalacióin de java
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil
Val: 4
Ha aumentado su posición en 6 puestos en Java (en relación al último mes)
Gráfica de Java

Instalación NetBeans en Centos 7

Publicado por Xo (3 intervenciones) el 21/02/2019 22:03:09
Si asi es. pero como tengo varias instalaciones de java:

java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64: drwxr-xr-x 3 root root 16 Jan 22 2018 jre
java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64: drwxr-xr-x 3 root root 16 Jul 5 2018 jre
java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64: drwxr-xr-x 3 root root 16 Oct 10 11:52 jre
java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64: drwxr-xr-x 4 root root 26 Dec 19 08:53 jre

Sin embargo, si modifique la variable de entorno en /usr/local/netbeans8.2/etc/netbeans.conf pero no logre ejecutar NetBeans:

netbeans_jdkhome="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64"

Pero sigue enviando:

Cannot find java. Please use the --jdkhome switch

Que mas puedo hacer?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar