官术网_书友最值得收藏!

Handling possible errors

Here are some possible errors you could run into when following the steps we previously outlined, along with some solutions:

  1. Error during compilation:
      javac: invalid flag: --module-source-path 

This is probably because you haven't switched to JDK 9 and are still using the Java 8 compiler. The --module-source-path option has been newly introduced to  javac as of version 9.

  1. Error during compilation:
      error: module not found: packt.addressbook 

This error is because the Java compiler is unable to find the module-info.java file. Make sure it is in the right directory path.

  1. Error during runtime:
      Error occurred during initialization of VM 
      java.lang.module.ResolutionException: Module packt.addressbook
not found

This error indicates that the module file is not available in the module path provided. Make sure the path is correctly specified and that the packt.addressbook folder contains the compiled module-info.class file.

主站蜘蛛池模板: 秦皇岛市| 汾阳市| 中阳县| 漾濞| 阿尔山市| 芜湖县| 梓潼县| 岐山县| 会理县| 安塞县| 陈巴尔虎旗| 嘉黎县| 贵阳市| 永川市| 东平县| 如皋市| 大港区| 玉树县| 肇庆市| 若尔盖县| 长沙县| 安平县| 通海县| 滁州市| 民勤县| 上饶县| 遵化市| 通山县| 阿克苏市| 东阿县| 陇川县| 繁峙县| 南乐县| 和田市| 酒泉市| 乐平市| 兴义市| 台江县| 略阳县| 久治县| 峨山|