简体   繁体   English

在Eclipse中运行没有源.java文件的项目

[英]Run a project without source .java files in Eclipse

I have a java project in Eclipse that I am trying to run/debug. 我在Eclipse中尝试运行/调试的Java项目。 When I run the project Eclipse goes into Debug mode and then throws a ClassNotFound Exception. 当我运行项目时,Eclipse进入调试模式,然后引发ClassNotFound Exception。 I have a class folder in the default package in my project that contains all the necessary class files. 我的项目的默认包中有一个类文件夹,其中包含所有必需的类文件。 Any help regarding this would be appreciated. 关于此的任何帮助将不胜感激。 Thanks! 谢谢!

The classes folder needs to be added to the project's classpath. 需要将classes文件夹添加到项目的classpath中。 Putting classes into the source directory isn't going to work. 将类放入源目录将无法正常工作。 Go to project properties -> Java Build Path to configure this. 转到项目属性-> Java Build Path进行配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM