atitit.错误:找不到或无法加载主类 的解决 v4 qa15.doc 艾提拉总结 attilax总结 1.1. 修改此java文件,让他启动编译,还是不能生成了新的class, 1 1.2. 查

atitit.错误:找不到或无法加载主类 的解决 v4 qa15.doc 艾提拉总结 attilax总结

 

1.1. 修改此java文件,让他启动编译,还是不能生成了新的class 1

1.2. 查看bin目录,输出有无此class的。。 1

1.3. 估计ide调试锁死class ,查看debug,退出调试,还是不行 1

1.4. Unlock  class dir 1

1.5. 估计是web 项目 服务器锁死class了。重启服务器,即可。 2

1.6. Recancel auto build ,then ok 2

1.7. other 2

1.8. 重新编译工程,还是不行。。 2

1.9. 只好改动类名,也不行。。 2

1.10. Eclipse .classpath文件问题  s412是这个问题 2

1.11. 只好重启eclipse 4

 

 

1.1. 修改此java文件,让他启动编译,还是不能生成了新的class 

1.2. 查看bin目录,输出有无此class的。。

查看问题提示,是不是有什么bin目录不能删除导致的不能编译。。是这个原因

 

1.3. 估计ide调试锁死class ,查看debug,退出调试,还是不行

1.4. Unlock  class dir

 

1.5. 估计是web 项目 服务器锁死class了。重启服务器,即可。

1.6. Recancel auto build ,then ok

1.7. other

重新编译工程,还是不行。。

查看bin目录,输出是有此class的。。

修改此java文件,让他启动编译,生成了新的class,但是还是提示这个错误。。

 

最后,只好改动类名,就可以了。。估计是ide cache的原因。。

 

1.8. 重新编译工程,还是不行。。

1.9. 只好改动类名,也不行。。

1.10. Eclipse .classpath文件问题  s412是这个问题

尝试新建一个项目,运行,如果可以那么就是项目设置问题

 

我的好的classpath文件

 

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

<classpath>

<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">

<attributes>

<attribute name="optional" value="true"/>

<attribute name="maven.pomderived" value="true"/>

</attributes>

</classpathentry>

<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">

<attributes>

<attribute name="maven.pomderived" value="true"/>

</attributes>

</classpathentry>

<classpathentry excluding="java/" kind="src" path="src/test"/>

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">

<attributes>

<attribute name="maven.pomderived" value="true"/>

</attributes>

</classpathentry>

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">

<attributes>

<attribute name="maven.pomderived" value="true"/>

<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

</attributes>

</classpathentry>

<classpathentry kind="src" output="target/test-classes" path="src/test/java">

<attributes>

<attribute name="optional" value="true"/>

<attribute name="maven.pomderived" value="true"/>

</attributes>

</classpathentry>

<classpathentry kind="output" path="target/classes"/>

</classpath>

 

1.11. 只好重启eclipse

 

 

 

有问题的classpath

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

<classpath>

<classpathentry including="**/*.java" kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/java">

<attributes>

<attribute name="optional" value="true"/>

<attribute name="maven.pomderived" value="true"/>

</attributes>

</classpathentry>

<classpathentry excluding="**" kind="src" output="src/main/webapp/WEB-INF/classes" path="src/main/resources">

<attributes>

<attribute name="maven.pomderived" value="true"/>

</attributes>

</classpathentry>

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

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.7.0_75"/>

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">

<attributes>

<attribute name="maven.pomderived" value="true"/>

<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

</attributes>

</classpathentry>

<classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/>

</classpath>

 

 

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值