我现在做一个EJB3.0的例子,但是用ANT编译的时候就报了JDK指向的错误。
我在JBOSS配置的时候JDK是指向我所安装的目录,但是怎么还报错,请大家帮我看看。Buildfile: D:\我的文档\workspace\ejb\build.xml
clean:
[delete] Deleting directory D:\我的文档\workspace\ejb\build\classes
[delete] Deleting directory D:\我的文档\workspace\ejb\build
[echo] C:\Program Files\Java\jdk1.5.0_07\bin/server/default/deploy/ejb3.jar
prepare:
[mkdir] Created dir: D:\我的文档\workspace\ejb\build
[mkdir] Created dir: D:\我的文档\workspace\ejb\build\classes
compile:
[javac] Compiling 10 source files to D:\我的文档\workspace\ejb\build\classesBUILD FAILED
D:\我的文档\workspace\ejb\build.xml:65: 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 "E:\MyEclipse6.0\jre"
我在JBOSS配置的时候JDK是指向我所安装的目录,但是怎么还报错,请大家帮我看看。Buildfile: D:\我的文档\workspace\ejb\build.xml
clean:
[delete] Deleting directory D:\我的文档\workspace\ejb\build\classes
[delete] Deleting directory D:\我的文档\workspace\ejb\build
[echo] C:\Program Files\Java\jdk1.5.0_07\bin/server/default/deploy/ejb3.jar
prepare:
[mkdir] Created dir: D:\我的文档\workspace\ejb\build
[mkdir] Created dir: D:\我的文档\workspace\ejb\build\classes
compile:
[javac] Compiling 10 source files to D:\我的文档\workspace\ejb\build\classesBUILD FAILED
D:\我的文档\workspace\ejb\build.xml:65: 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 "E:\MyEclipse6.0\jre"
It is currently set to "E:\MyEclipse6.0\jre"应该指向jdk目录
当前是jre
eclipse菜单 -> window -> Preferences
弹出一个窗口, 然后选java -> InstallJRE
选择一个JDK,不要用JRE