look from your email :
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
===============================================
When I do echo $JAVA_HOME, this is the output that I have [
/usr/java/jdk1.7.0_17/bin:/usr/java/jdk1.7.0_17/lib ].
your JAVA_home should be something like :'/usr/java/jdk1.7.0_17'
no bin or lib or anything else should be in it.
if your java home is pointed to '/usr/java/jdk1.7.0_17/jre' it would
basically will have you using JRE instead of JDK which means you won't
be able to compile anything. also you should check your PATH. you should
have '/usr/java/jdk1.7.0_17/bin' on your path so ant would be able to
find javac.
On 04/12/2013 11:53 AM, Yves S. Garret wrote:
The really weird thing is the fact that even after I run the following
script
ant.sh:
=============================================
#!/bin/sh
JAVA_HOME=/usr/java/jdk1.7.0_17/bin:/usr/java/jdk1.7.0_17/lib; export
JAVA_HOME
ant $@
=============================================
I _still_ get the same error of having JAVA_HOME point to that jre
directory.
What am I missing?
---------- Forwarded message ----------
From: Yves S. Garret <[email protected]>
Date: Fri, Apr 12, 2013 at 2:31 PM
Subject: An Ant + Apache question
To: [email protected]
Hello, I'm trying to compile a new instance of Apache Nutch. After running
"ant runtime", this is the error that I'm getting:
===============================================
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:
clean-lib:
[delete] Deleting directory
/home/azureuser/Downloads/apache-nutch-2.1/build/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
===============================================
When I do echo $JAVA_HOME, this is the output that I have [
/usr/java/jdk1.7.0_17/bin:/usr/java/jdk1.7.0_17/lib ].
That's where my version of java was installed that I downloaded from
Oracle. What am I missing?