How to compile java package structures using javac

前端 未结 5 627
逝去的感伤
逝去的感伤 2020-11-29 06:20

I am trying to compile (from the command line) a java package that imports another package of my own. I was following a tutorial online but it seems that I get an error when

5条回答
  •  心在旅途
    2020-11-29 06:28

    (1)first compile the code

    javac -d importpackage.subpackage.HelloWorld

    (2) and then compile the CallPackage.java

    javac CallPackage.java

提交回复
热议问题