cannot compile Java 9 module with --patch-module in IntelliJ IDEA 2017.2.1

拥有回忆 提交于 2019-12-03 04:41:40

Well eventually with the following configuration of the IntelliJ(Fix version of IDEA-169150) -

IntelliJ IDEA 2018.1 (Community Edition)
Build #IC-181.4203.550, built on March 27, 2018
JRE: 1.8.0_152-release-1136-b20 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.3

and the Java Compiler settings for the project as the one in the following screenshot:-

  • Override compiler paramaters per-module
  • Select the module
  • Add the compilation option to patch (Note - I've used the latest version of the jar)

    --patch-module com.effjava.collect=/Users/naman.nigam/.m2/repository/com/google/guava/guava/24.1-jre/guava-24.1-jre.jar
    

Post this select Build > Build Project and the build completes successfully(though I still see RegularImmutableList in MyImmutableList as red) for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!