c*****t 发帖数: 1879 | 1 I was able to launch ant view, but when I tried to compile things,
the following error occurred
Buildfile: E:\pjcvs\build.xml
eclipse:
init:
compile:
[javac] Compiling 257 source files to E:\pjcvs
BUILD FAILED: E:\pjcvs\build.xml:33: 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
Total time: 3 seconds
Eclipse 2.1x also had similar problem, but I forgot the necessary
fix (setting variable?) Anyone can help?
Thank | w*r 发帖数: 2421 | 2 put CLASSPATH in your build script, or ant script.
【在 c*****t 的大作中提到】 : I was able to launch ant view, but when I tried to compile things, : the following error occurred : Buildfile: E:\pjcvs\build.xml : eclipse: : init: : compile: : [javac] Compiling 257 source files to E:\pjcvs : BUILD FAILED: E:\pjcvs\build.xml:33: 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
| w*****a 发帖数: 6 | 3 我用的是jikes.
Put jikes.exe in the PATH.
javac 太慢了.
我在2.1下面不能rmic, 也是说什么和JAVA_HOME有关. 但是3.0没有问题.
【在 c*****t 的大作中提到】 : I was able to launch ant view, but when I tried to compile things, : the following error occurred : Buildfile: E:\pjcvs\build.xml : eclipse: : init: : compile: : [javac] Compiling 257 source files to E:\pjcvs : BUILD FAILED: E:\pjcvs\build.xml:33: 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
| c*****t 发帖数: 1879 | 4 I found several solutions to it for 2.11
http://www.mjwall.com/node/view/134
the first setting property using build.compiler didn't work for
3.0 for some reason. JDTCompilerAdapter is in plugin directory..
So, I opted to add tools.jar to the runtime classpath of Ant.
【在 w*r 的大作中提到】 : put CLASSPATH in your build script, or ant script.
| c*****t 发帖数: 1879 | 5 I think that Eclipse use Jikes by default, so normally when I
edit and save in Eclipse, it will automatically compile it
for me anyways. So, most of the time my build.xml just do
the jaring.
Dunno if Jikes does any optimizations or not, but I know javac
doesn't do any :(
【在 w*****a 的大作中提到】 : 我用的是jikes. : : Put jikes.exe in the PATH. : javac 太慢了. : 我在2.1下面不能rmic, 也是说什么和JAVA_HOME有关. 但是3.0没有问题.
| m******t 发帖数: 2416 | 6 Did you try setting JAVA_HOME to a JDK instead of a JRE?
I have been using Eclipse 3.0 milestone builds for a few months
and have never got this problem.
【在 c*****t 的大作中提到】 : I think that Eclipse use Jikes by default, so normally when I : edit and save in Eclipse, it will automatically compile it : for me anyways. So, most of the time my build.xml just do : the jaring. : Dunno if Jikes does any optimizations or not, but I know javac : doesn't do any :(
|
|