aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant javac 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 "Ant javac" Watch "Ant javac" New topic
Author

Ant javac

Suresh Krishna moorthi
Greenhorn

Joined: Nov 28, 2011
Posts: 2
Hi
I have the following error when i try to create the war file using ANT script in eclipse EE

C:\Documents and Settings\Administrator\workspace\Assignment7\build.xml:67: 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 "C:\Program Files\Java\jre6"

Please help me to solve this problem

Thanks advancely.
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

This isn't a distributed java question, moving to Ant forum.


apigee, a better way to API!
Tina Smith
Ranch Hand

Joined: Jul 21, 2011
Posts: 171
    
    5

JDK is different than the JRE; JRE doesn't have a javac executable. You need to point your JAVA_HOME (or PATH) to the JDK which is probably located at "C:\Program Files\Java\jdk1.6.x\bin\"
In that directory you should have a javac executable.


Everything is theoretically impossible, until it is done. ~Robert A. Heinlein
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

One correction to Tina's example: don't set JAVA_HOME to the bin directory, set it to, for example, "C:\Program Files\Java\jdk1.6.0_30"


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant javac