0

我是 Netbeans 的新手,我的教授给了我一个简单的练习来查找给定程序中的编译器错误。这是一个简单的 hello world 程序,但我得到的只是

Compiling 1 source file to D:\UCC\CS6312-Mobile Devices and Systems\Lab\MyFirstMIDlet\build\compiled
D:\UCC\CS6312-Mobile Devices and Systems\Lab\MyFirstMIDlet\src\myfirstmidlet\MyFirstMIDlet.java:12: error: ';' expected
    form.addCommand(exit)
1 error
D:\UCC\CS6312-Mobile Devices and Systems\Lab\MyFirstMIDlet\nbproject\build-impl.xml:359: Compile failed; **see the compiler error output for details.**
BUILD FAILED (total time: 0 seconds)

所以我想知道在哪里可以找到编译器错误的详细信息,因为我必须将这些错误包含在我的作业中。谢谢

4

1 回答 1

0

编译错误是错误消息的第一位:

D:\UCC\CS6312-移动设备和系统\Lab\MyFirstMIDlet\src\myfirstmidlet\MyFirstMIDlet.java:12: 错误:';' 预期的 form.addCommand(exit)

这可能正是它所说的意思,并且您在这一行缺少分号,但不一定 - 可能是其他错误导致编译器产生该错误。您也可能会遇到这样的情况:您修复了该错误,然后必须修复之后出现的其他一些错误——这就是编译器的本质!

于 2013-10-07T14:43:59.123 回答