最佳答案
我对你提到的原子扩展没有经验,但它看起来确实工作正常,因为它尝试编译你的代码。
但是该代码不是有效的 java 程序。您需要一个包装类和一个 main
方法作为执行的起点。 java 编译器甚至试图告诉你:
Runner.java:2: error: class, interface, or enum expected
这意味着:Runner.java的第二行有一个错误。应该 可以是类、接口(interface)或枚举,但还有其他东西。
尝试编译hello world hello world example of wikipedia开始阅读全文:
class Runner {
public static void main(String[] args) {
System.out.println("Hello World!"); // Prints the string to the console.
}
}
关于java - 在 Atom 上设置 java 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41148703/