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

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.

主站蜘蛛池模板: 琼结县| 高唐县| 平遥县| 夏河县| 龙南县| 大宁县| 惠来县| 班玛县| 信阳市| 积石山| 新郑市| 油尖旺区| 孝昌县| 临桂县| 名山县| 宁夏| 太湖县| 淮阳县| 冕宁县| 游戏| 红桥区| 宁陵县| 吴川市| 宜川县| 巴青县| 麻栗坡县| 门头沟区| 安泽县| 彭泽县| 平度市| 英山县| 合肥市| 当涂县| 清河县| 栾城县| 潞城市| 迁安市| 旅游| 公安县| 海阳市| 新竹县|