Solution for eclipse NoClassDefFoundError

来源:互联网 发布:微信跳转到淘宝app 编辑:程序博客网 时间:2024/05/22 14:17

I encountered the problem of NoClassDefFoundError when run the newly established java project.

I searched on the Internet, but none of those solution works on me.

After several tests, I found that I set wrong .project and .classpath file. 

So I put the well configured files in the following:

FileName: .classpath

<?xml version="1.0" encoding="UTF-8"?>

<classpath>

<classpathentry kind="src" path="src"/>

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

<classpathentry kind="output" path="bin"/>

</classpath>


FileName: .project

<?xml version="1.0" encoding="UTF-8"?>

<projectDescription>

<name>YOURPROJECTNAME</name>

<comment></comment>

<projects>

</projects>

<buildSpec>

<buildCommand>

<name>org.eclipse.jdt.core.javabuilder</name>

<arguments>

</arguments>

</buildCommand>

</buildSpec>

<natures>

<nature>org.eclipse.jdt.core.javanature</nature>

</natures>

</projectDescription>


0 0
原创粉丝点击