Não é possível localizar o compilador Javac em.ZKUI

2

Eu quero instalar o zkui no centos 7.1, mas eu tenho esse erro.

[root@server-1 zkui]# mvn clean install
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building zkui 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zkui ---
[INFO] Deleting /root/zkui/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zkui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 29 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ zkui ---
[INFO] Compiling 20 source files to /root/zkui/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.680 s
[INFO] Finished at: 2018-01-02T08:17:00-05:00
[INFO] Final Memory: 11M/102M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project zkui: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR]   /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre/../lib/tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Versão do Mvn:

[root@server-1 zkui]# mvn -v
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T03:58:13-04:00)
Maven home: /usr/local/maven3
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-229.el7.x86_64", arch: "amd64", family: "unix"

Além disso, meu JAVA_HOME:

[root@server-1 zkui]# echo $JAVA_HOME  
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre
    
por pyramid13 02.01.2018 / 11:16

2 respostas

0

Como as dicas de mensagem de erro, você não tem um Java Development Kit (JDK) instalado, apenas um Java Runtime Environment. Um JDK é um superconjunto de um JRE e inclui ferramentas para desenvolver programas Java, ferramentas como o compilador Javac Java, que o plugin Maven precisa. Para corrigir, instale um JDK.

    
por 02.01.2018 / 15:06
1

Eu instalei tools.jar e resolvi.

[root@server-1]# yum install java-1.8.0-openjdk-devel

    
por 03.01.2018 / 06:09

Tags