Home  >  Q&A  >  body text

java editplus package

我的这个文件的路径名是E:\java\java_study\test2 ;
@转啊转

天蓬老师天蓬老师2765 days ago492

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 11:40:04

    Ahhhh, here’s another picture, see the text below

    For the first picture, you compiled it in the directory of the java file, right? javac Test2.java
    But because this file has been declared package, it only serves as a directory, and an error is reported directly in place java Test2. However, if you create a directory java_study at this time, and then put the class file into it, then java java_study.Test2 that will be fine. It's running.
    ps: package mainly plays the role of directory //I rarely use the command line to compile and run java, so skipping it directly is a failure

    reply
    0
  • Cancelreply