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

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.

主站蜘蛛池模板: 蕉岭县| 二连浩特市| 五台县| 顺义区| 保亭| 温泉县| 衡山县| 许昌市| 荃湾区| 郓城县| 徐汇区| 阿瓦提县| 宜昌市| 天气| 彭阳县| 田东县| 台安县| 井研县| 福安市| 福泉市| 平阳县| 福贡县| 静乐县| 当雄县| 正宁县| 丰镇市| 开平市| 永善县| 马关县| 延长县| 子洲县| 泸定县| 湟源县| 广元市| 定西市| 凯里市| 江门市| 西峡县| 阿拉善盟| 三河市| 富平县|