I installed jetty on a CentOS 6 server, but when i try to reach a WAR example of jetty I get this error :
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
yum says that the JDK 1.6 is already installed and when I run
locate javac
nothing relevant is returned.
I added /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin
to $PATH
but I think this is still JRE and not a JDK.
I downloaded and executed java_ee_sdk-6u4-jdk7-linux-x64.sh
but it outputs Could not locate a suitable jar utility.
Do someone know how could I install the Java development kit 1.6 on this server ?
EDIT :
I updated JAVA_HOME and PATH and I still get the same error.
I added the following commands to my bash_profile :
export PATH=/usr/java/latest/bin:$PATH:$HOME/bin
export JAVA_HOME=/usr/java/latest/
But I get an unexpected EOF syntax error
EDIT 2 :
I installed jdk-7-linux-x64.rpm
as the other weren't working, which generated new files in /usr/java/
. unfortunately, after adding the new path to java it still doesn't work.
thanks in advance
Best Answer
You need to install
java-1.6.0-openjdk-devel
as well.