OS X 上的 Eclipse v3.7.1:古怪的编译错误
我正在尝试在 eclipse 中编译 Nachos OS。当我运行“make”(调用 javac)时,该项目编译得很好,但是当我尝试在 Eclipse 中运行它时,它会抛出一些奇怪的 java 错误。例如,它报告此 javadoc 注释的最后一行是一个无法找到的文件...
代码片段:
/**
* The master class of the simulated machine. Processes command line arguments,
* constructs all simulated hardware devices, and starts the grader.
*/
public final class Machine {
/**
* Nachos main entry point.
*
* @param args the command line arguments.
*/
public static void main(final String[] args) {
System.out.print("nachos 5.0j initializing...");
错误输出:
/Users/dan/git/nachos/machine/Machine.java: line 19: */: No such file or directory
/Users/dan/git/nachos/machine/Machine.java: line 20: syntax error near unexpected token `('
/Users/dan/git/nachos/machine/Machine.java: line 20: ` public static void main(final String[] args) {'
我正在使用 OS X 10.7.2 (Lion) 和 Java SE 6 (1.6.1)。 0 jdk)。 我已配置构建设置以使用 Nachos 的 Machine.Machine.java main 函数。
知道为什么 Eclipse 的输出很奇怪吗?
I'm trying to compile Nachos OS in eclipse. The project compiles fine when I run "make" (which calls javac), but when I try to run it in eclipse, it spits out some bizarre java errors. For example, it is reporting that the last line of this javadoc comment is a file that it is unable to find...
Code Fragment:
/**
* The master class of the simulated machine. Processes command line arguments,
* constructs all simulated hardware devices, and starts the grader.
*/
public final class Machine {
/**
* Nachos main entry point.
*
* @param args the command line arguments.
*/
public static void main(final String[] args) {
System.out.print("nachos 5.0j initializing...");
Error Output:
/Users/dan/git/nachos/machine/Machine.java: line 19: */: No such file or directory
/Users/dan/git/nachos/machine/Machine.java: line 20: syntax error near unexpected token `('
/Users/dan/git/nachos/machine/Machine.java: line 20: ` public static void main(final String[] args) {'
I am using OS X 10.7.2 (Lion) with Java SE 6 (1.6.0 jdk).
I have configured the build settings to use Nachos' Machine.Machine.java main function.
Any idea why the odd output from Eclipse?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎项目文件在将其加载到位桶服务器的过程中损坏了。我放弃了 Eclipse,就像一个坏习惯一样,转而使用 IntelliJ。现在真是幸福多了。
Seems like the project file got corrupted in the process of loading it onto a bitbucket server. I dropped eclipse like a bad habit in favor of IntelliJ. Soooo much happier now.