将源文件夹包含到 Eclipse 中的类路径中
如果我将源文件夹添加为 Java 构建路径/库中的类文件夹,Eclipse 会抱怨。
我需要这个用于要求源位于类路径中的 GWT。一种解决方案是手动将所有项目的源文件夹添加到启动配置的类路径中,但由于特定原因,这不适合我。
另一个解决方案是告诉 Eclipse 将所有 *.java
文件复制到 bin
文件夹(就像其他资源一样),但我也无法实现这一点。
Eclipse complains if I add source folder as a class folder in Java Build Path / Library.
I need this for GWT that requires sources to be in the classpath. One solution is to manually add source folders of all projects to classpath of the launch configuration, but this is not suitable for me because of specific reasons.
Another solution would be to tell Eclipse to copy all *.java
files to bin
folder (as it does for other resources), but I can't achieve this too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否使用 Google 的 GWT 插件 (http://code.google.com/eclipse/docs/getting_started.html)。虽然我没有使用过它,但我的一个同事用过它,并且我有理由确信它可以处理类路径问题中的此类 java 代码。
Are you using the GWT plug-in by Google (http://code.google.com/eclipse/docs/getting_started.html). Although I have not used it, a collegue of mine did, and I am reasonably sure it handles this kind of java code in the classpath issue.
我找到了解决方案 - 将 Ant 构建器添加到指向以下 ant 文件的所有项目:
我的 .project 文件如下所示:
I've found the solution - to add Ant builder to all projects pointing to the following ant file:
My .project files look like this: