A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Ant, Maven and Other Build Tools
Unable to set the JAVA_HOME build path
Joined: Apr 12, 2013
Apr 12, 2013 13:49:26
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?
Joined: Nov 21, 2010
Apr 13, 2013 04:44:58
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)
It is sorta covered in the
JavaRanch Style Guide
subject: Unable to set the JAVA_HOME build path
Including images and font
Sonar keeps downloading plugins for every analysis
Mod_jk NEED HELP!!!
Compile EJB using ant target
Testing using ANT
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015