Every java program I try to start shows error

前端 未结 3 706
野的像风
野的像风 2021-01-19 01:37

SOLVED, Program was in location with national symbol in it\'s path.

I just started studying java, but every program i try to start (even example ones from my course)

3条回答
  •  情话喂你
    2021-01-19 01:59

    Error: Could not find or load main class "Any class name of program I try start"
    C:\Users\Mine\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53:           Java returned: 1
    BUILD FAILED (total time: 0 seconds)
    

    You are attempting to run a class called Any class name of program I try start, however the name of your class is Hello.

    I don't know how Netbeans does things, but I would first try compiling and running the program without netbeans.

    javac Hello.java
    java Hello
    

    If that works then open up the run settings in netbeans and make sure that it is doing the same thing.

提交回复
热议问题