[英]Eclipse Ant ClassPath Issue
eclipse.buildId=M20130204-1200
java.version=1.8.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
Error
Tue Jul 21 10:25:12 EDT 2015
Could not find one or more classes: "org.apache.tools.ant.BuildException". Please check the Ant classpath.
java.lang.NoClassDefFoundError: org/apache/tools/ant/BuildException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:324)
at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:298)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.BuildException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at org.eclipse.ant.internal.core.AntClassLoader.findClass(AntClassLoader.java:54)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Juno ships with a version of ANT which doesn't work with Java 8, you'll need to manually install a version that works. Juno附带的ANT版本不适用于Java 8,您需要手动安装一个有效的版本。
It's detailed here 这里详细
https://wiki.eclipse.org/Ant/Java8 https://wiki.eclipse.org/Ant/Java8
https://bugs.eclipse.org/bugs/show_bug.cgi?id=395421 https://bugs.eclipse.org/bugs/show_bug.cgi?id=395421
So you need to move to Luna or upgrade Ant manually. 因此,您需要移至Luna或手动升级Ant。
There can be two possibilities: First Your ANT_HOME
has the default enties and has the older version of ANT. 有两种可能:首先,您的
ANT_HOME
具有默认的实体,并且具有较旧的ANT版本。
Go and manually change the entry there and include the required JAR 转到那里手动更改条目,并包含所需的JAR
Preferences > Ant > Runtime > Classpath > Ant Home Entries (Default)
首选项> Ant>运行时>类路径> Ant主页条目(默认)
LIB
folder. LIB
文件夹中。 ANT_HOME
has not been configured. ANT_HOME
尚未配置。 Go in the above path and configure.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.