| Author |
Ant in Eclipse
|
Yonghang Cai
Greenhorn
Joined: Apr 22, 2003
Posts: 5
|
|
When i use javac task of ant in eclipse,the error happen. error is : [javac] BUILD FAILED: file :/eclipse/workspace/MyEJB/build.xml:26: 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 but I use echo to print JAVA_HOME is [echo] d:\jdk1.4\jre <echo message="${java.home}" /> how can i do?I want use javac task in eclipse. Thank u PS:My eclipse is 2.1 [ April 25, 2003: Message edited by: Yonghang Cai ]
|
 |
Amol Desai
Ranch Hand
Joined: Jan 29, 2003
Posts: 82
|
|
Hi, Set JAVA_HOME to d:\jdk1.4\ instead of d:\jdk1.4\jre. Hope it works.Get back if you have any issues
|
 |
Yonghang Cai
Greenhorn
Joined: Apr 22, 2003
Posts: 5
|
|
I can not do it. If java_home point to jdk folder(use "regedit"),eclipse will not work. I must copy jre into eclipse folder,but JAVA_HOME be point to jre folder which in eclipse folder. If I modify JAVA_HOME in environment variable , the JAVA_Home still d:\jdk1.4\jre in ant How can i do now? Thanks. [ April 25, 2003: Message edited by: Yonghang Cai ]
|
 |
Rene Larsen
Ranch Hand
Joined: Oct 12, 2001
Posts: 1177
|
|
You need to add 'tools.jar' to ANT runtime classpath in eclipse. Rene [ April 25, 2003: Message edited by: Rene Larsen ]
|
Regards, Rene Larsen
Dropbox Invite
|
 |
Yonghang Cai
Greenhorn
Joined: Apr 22, 2003
Posts: 5
|
|
I can do it. Thanks Amol Desai and Rene Larsen !
|
 |
 |
|
|
subject: Ant in Eclipse
|
|
|