ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhaval Chokshi" <dhavalchok...@elitecore.com>
Subject Re: BUILD error - Unable to find a javac compiler
Date Tue, 02 Sep 2003 06:23:15 GMT
hello,

Your java version in the PATH variable is not matching with the java version in the JAVA_HOME
variable.

> error message is 
> 
> BUILD FAILED
> file:../build.xml:220: 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
> 
> I have scanned the mail archives for solutions and
>  
> - checked my environment variables which all seem OK
> - tried to set the compiler path in the build.xml as such but this had
> no impact
>   executable="/usr/local/lib/jdk/bin/javac"
> 
> I can compile OK from the command line e.g
> javac hello.java
> 
> my environment variables inc
> 
> TOMCAT_HOME=/usr/share/tomcat4
> PATH=/usr/local/lib/jdk/bin:/usr/share/ant:...
> JAVA_COMPLIER=javac
> JAVA_HOME=/usr/local/lib/j2sdk1.4.1_04
> ANT_HOME=/usr/share/ant
> CATALINA_HOME=/usr/share/tomcat4/
> CLASSPATH=heaps of jars
> 
> I am running 
> - debian 2.4.20 (testing) with suns jdk
> - Ant version 1.5.3 
> - j2sdk1.4.1_04
>  
> thanks
> 
> AG
> 
> 
> verbose ant output is
> 
> Apache Ant version 1.5.3 compiled on April 9 2003
> Buildfile: build.xml
> Detected Java version: 1.4 in: /usr/local/lib/j2sdk1.4.1_04/jre
> Detected OS: Linux
> parsing buildfile build.xml with URI =
> file:/home/alang/cvs/passwdreset/build.xml
> Project base dir set to: /home/alang/cvs/passwdreset
>  [property] Loading /home/alang/cvs/passwdreset/build.properties
>  [property] Unable to find property file:
> /home/alang/cvs/passwdreset/build.properties
>  [property] Loading /home/alang/build.properties
>  [property] Unable to find property file: /home/alang/build.properties
> Build sequence for target `compile' is [prepare, compile]
> Complete build sequence is [prepare, compile, javadoc, clean, deploy,
> all, dist]
> 
> prepare:
>      [copy] WEB-INF/config-log.properties omitted as
> WEB-INF/config-log.properties is up to date.
>      [copy] WEB-INF/web.xml omitted as WEB-INF/web.xml is up to date.
>      [copy] jsp/passwordresetentry.jsp omitted as
> jsp/passwordresetentry.jsp is up to date.
>      [copy] jsp/passwordresetview.jsp omitted as
> jsp/passwordresetview.jsp is up to date.
>      [copy]  omitted as  is up to date.
>      [copy] WEB-INF omitted as WEB-INF is up to date.
>      [copy] WEB-INF/classes omitted as WEB-INF/classes is up to date.
>      [copy] jsp omitted as jsp is up to date.
> 
> compile:
>     [javac] tools/passwdreset/PasswdResetController.java added as
> tools/passwdreset/PasswdReset
> Controller.class doesn't exist.
>     [javac] tools/passwdreset/PasswdResetSetup.java added as
> tools/passwdreset/PasswdResetSetup
> .class doesn't exist.
>     [javac] Compiling 2 source files to
> /home/alang/cvs/passwdreset/build/WEB-INF/classes
> 
> BUILD FAILED
> file:/home/alang/cvs/passwdreset/build.xml:220: 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
> at
> org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerA
> dapterFactory.java:139)
> at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:835)
> at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
> at org.apache.tools.ant.Task.perform(Task.java:341)
> at org.apache.tools.ant.Target.execute(Target.java:309)
> at org.apache.tools.ant.Target.performTasks(Target.java:336)
> at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
> at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
> at org.apache.tools.ant.Main.runBuild(Main.java:609)
> at org.apache.tools.ant.Main.start(Main.java:196)
> at org.apache.tools.ant.Main.main(Main.java:235)
> 
> Total time: 2 seconds
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message