Register / Login
Win a copy of
Mesos in Action
this week in the
Ant, Maven and Other Build Tools
Unable to set the JAVA_HOME build path
posted 3 years ago
Hello everyone. I'm currently trying to build Apache Nutch using
on CentOS 6.3. However, when I run "ant runtime", this is what I see:
$ ant runtime Buildfile: build.xml [taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found. ivy-probe-antlib: ivy-download: [taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found. ivy-download-unchecked: ivy-init-antlib: ivy-init: init: [mkdir] Created dir: /home/azureuser/Downloads/apache-nutch-2.1/build [mkdir] Created dir: /home/azureuser/Downloads/apache-nutch-2.1/build/classes [mkdir] Created dir: /home/azureuser/Downloads/apache-nutch-2.1/build/release [mkdir] Created dir: /home/azureuser/Downloads/apache-nutch-2.1/build/test [mkdir] Created dir: /home/azureuser/Downloads/apache-nutch-2.1/build/test/classes clean-lib: resolve-default: [ivy:resolve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ :: [ivy:resolve] :: loading settings :: file = /home/azureuser/Downloads/apache-nutch-2.1/ivy/ivysettings.xml [taskdef] Could not load definitions from resource org/sonar/ant/antlib.xml. It could not be found. copy-libs: compile-core: [javac] Compiling 178 source files to /home/azureuser/Downloads/apache-nutch-2.1/build/classes BUILD FAILED /home/azureuser/Downloads/apache-nutch-2.1/build.xml:97: 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/java/jdk1.7.0_17/jre" Total time: 11 seconds
However, when I run "echo $JAVA_HOME", this is what I get:
$ echo $JAVA_HOME /usr/java/jdk1.7.0_17/bin:/usr/java/jdk1.7.0_17/lib
Now, what gives? Am I not setting something correctly? Should I change something in build.xml?
posted 3 years ago
JAVA_HOME variable should point to jdk folder and not to the child folders.
In your case
SCJP 5.0 OCBCD 5.0(Formerly SCBCD)
Including images and font
Sonar keeps downloading plugins for every analysis
Mod_jk NEED HELP!!!
Compile EJB using ant target
Testing using ANT