File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Build error. Compiler Adapter 'javac1.6' can't be found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Build error. Compiler Adapter Watch "Build error. Compiler Adapter New topic
Author

Build error. Compiler Adapter 'javac1.6' can't be found

Santhosh ayiappan
Ranch Hand

Joined: Jan 30, 2007
Posts: 80

The build file is successfully being run if the compiler="${JAVAC.COMPILER}"(javac1.5). But it fails if we use javac1.6.

This is the entry in build.xml file


The prop file entries are
DISTRIB.JAVAC.COMPILER=javac1.6 has issue -- javac1.5 it is working
DISTRIB.JAVAC.SOURCE=1.6
DISTRIB.JAVAC.TARGET=1.6

I have JDK .16 installed and ant 1.7 installed on my machine.

Any help would be greatly appreciated.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Are you using JDK 6 to run Ant? What is JAVA_HOME set to?

Which exact version of Ant? You mentioned 1.7, but is it really 1.7.1? (I'm looking at the 1.7.1 docs, which say that javac1.6 is valid; I don't know if it is valid in 1.7. Also, from reading the docs it appears that using javac1.6 is the same as using javac1.5, they are both aliases for "modern" which means to use the standard JDK compiler.)


JBoss In Action
Santhosh ayiappan
Ranch Hand

Joined: Jan 30, 2007
Posts: 80

ANT version is 1.7 and the Java home is set to set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_18.

Let me try to use Ant 1.7.1 and try to execute the ant script.

Regards
Santhosh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Build error. Compiler Adapter 'javac1.6' can't be found