vscodemaven 配置_使用VSCode搭建简单Java开发环境(二、Maven环境)

Hi admin , I am trying use VSCode to bulid java project. And I tried use below codes:

public class Main{

public static void main(String[] args){




And when i run, it gives me a error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:

at Main.main(main.java:2)

After that I tried use the cmd javac to compile the .java file, and it compile successfully, and run the class it turn out the test word.

I delete the public before the class in line 1 and it worked.


I didn't know why, please tell me when you are free. Thanks for your time.

评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页