Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant javac

 
Suresh Krishna moorthi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't a distributed java question, moving to Ant forum.
 
Tina Smith
Ranch Hand
Posts: 208
9
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic