由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - ant javac error in eclipse 3.0?
相关主题
也问一个Eclipse的问题能这样编网站吗?
Eclipse and java 1.6How big is the penalty for compile with debugging mode on?
JBuilder questionhelp:tomcat5 on FC4
com.sun.tools.javac.Main 问题java compilation question
faint, unreachable statement in javaHelp with Tomcat for Eclipse v1.03
关于linux 下makefile求救!问个eclipse的问题
请问javax.portlet包在JDK的哪个jar文件里面(在线等)问个eclipse装jar的入门问题
请帮忙看看这个编译错误安装tomcat不成功
相关话题的讨论汇总
话题: eclipse话题: javac话题: ant话题: pjcvs话题: error
进入Java版参与讨论
1 (共1页)
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 :(

1 (共1页)
进入Java版参与讨论
相关主题
安装tomcat不成功faint, unreachable statement in java
Re: 新生上路关于linux 下makefile求救!
help "java.lang.NoSuchMethodError"请问javax.portlet包在JDK的哪个jar文件里面(在线等)
Question on J2EE container请帮忙看看这个编译错误
也问一个Eclipse的问题能这样编网站吗?
Eclipse and java 1.6How big is the penalty for compile with debugging mode on?
JBuilder questionhelp:tomcat5 on FC4
com.sun.tools.javac.Main 问题java compilation question
相关话题的讨论汇总
话题: eclipse话题: javac话题: ant话题: pjcvs话题: error