0
votes

I am opening an older NetBeans project and I want to build it using ant in bash with debian. However, when I try to run ant, I get this error

BUILD FAILED /home/karelbilek/NetBeansProjects/oldProject/nbproject/build-impl.xml:528: The following error occurred while executing this line: /home/karelbilek/NetBeansProjects/oldProject/nbproject/build-impl.xml:261: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "/usr/lib/jvm/java-7-openjdk-i386/jre"

What does that mean? What should I do? In "/usr/lib/jvm/java-7-openjdk-i386/jre" there seems to be an actual JRE when I look there, so what is the problem?

2

2 Answers

3
votes

You're pointing to a JRE (Java runtime environment) but not a JDK (Java development kit).

Only the JDK contains the compiler (javac). The JRE is used for running Java programs but doesn't carry the extra components of the JDK (compiler etc.)

0
votes

it happened for me and i got through it by installing the jdk

sudo apt-get install openjdk-7-jdk

After installing jdk, the classpath executed right