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

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.

主站蜘蛛池模板: 信阳市| 隆化县| 灵丘县| 信宜市| 扶风县| 锡林浩特市| 普宁市| 红安县| 新化县| 西峡县| 旺苍县| 惠水县| 峨山| 定西市| 若尔盖县| 广汉市| 陆河县| 磐石市| 新营市| 杂多县| 夏河县| 临颍县| 临颍县| 陇南市| 宣城市| 姚安县| 泰顺县| 运城市| 无极县| 连城县| 丰台区| 米脂县| 重庆市| 黄浦区| 洪江市| 乐至县| 盖州市| 大连市| 确山县| 霍州市| 石渠县|