編譯Java 9我想toplay周圍Java9在最新的IntelliJ(社區版):麻煩的IntelliJ
IntelliJ IDEA的2016.3 構建#IC-163.7743.44,建立在二零一六年十一月十七日 JRE: 1.8.0_112-release-408-b2 x86 JVM:由JetBrains sro提供的OpenJDK Server VM
無需編寫任何代碼Error:Abnormal build process termination: C:\Users\pisarevv\Desktop\jdk-9\bin\java -Xmx700m -Djava.awt.headless=true -Djdt.compiler.useSingleThread=true -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djava.net.preferIPv4Stack=true -Dio.netty.initialSeedUniquifier=1630946162877517857 -Dfile.encoding=windows-1252 -Djps.file.types.component.name=CommunityFileTypes -Duser.language=en -Duser.country=US -Didea.paths.selector=IdeaIC2016.3 "-Didea.home.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3" -Didea.config.path=C:\Users\pisarevv\.IdeaIC2016.3\config -Didea.plugins.path=C:\Users\pisarevv\.IdeaIC2016.3\config\plugins -Djps.log.dir=C:/Users/pisarevv/.IdeaIC2016.3/system/log/build-log "-Djps.fallback.jdk.home=C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/jre/jre" -Djps.fallback.jdk.version=1.8.0_112-release -Djava.io.tmpdir=C:/Users/pisarevv/.IdeaIC2016.3/system/compile-server/_temp_ -Dkotlin.incremental.compilation.experimental=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path=\"C:\Users\pisarevv\AppData\Local\Temp\kotlin-idea-451096579120734544-is-running\" -classpath "C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jps-launcher.jar;C:/Users/pisarevv/Desktop/jdk-9/lib/tools.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/optimizedFileManager.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/ecj-4.6.1.jar" org.jetbrains.jps.cmdline.Launcher "C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jps-builders.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jna.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/asm-all.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/forms_rt.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/annotations.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/util.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/netty-all-4.1.5.Final.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/snappy-in-java-0.5.1.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/trove4j.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/openapi.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jps-model.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/nanoxml-2.2.3.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/javac2.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jna-platform.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/rt/jps-plugin-system.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/protobuf-2.5.0.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jdom.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/oromatcher.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/idea_rt.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/log4j.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/resources_en.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jgoodies-forms.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/IntelliLang/lib/intellilang-jps-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Groovy/lib/groovy-jps-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Groovy/lib/groovy-rt-constants.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/maven/lib/maven-jps-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/maven/lib/aether-dependency-resolver.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/maven/lib/aether-1.1.0-all.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/maven/lib/maven-aether-provider-3.3.9-all.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/maven/lib/plexus-utils-2.0.6.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Kotlin/lib/kotlin-runtime.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Kotlin/lib/kotlin-reflect.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Kotlin/lib/kotlin-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Kotlin/lib/kotlin-android-extensions-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/Kotlin/lib/kotlin-android-extensions-compiler-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/javaFX/lib/javaFX-jps-plugin.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/plugins/javaFX/lib/common-javaFX-plugin.jar" org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 62860 aa8c9c68-3477-48ea-9f1c-5086eaa5935d C:/Users/pisarevv/.IdeaIC2016.3/system/compile-server Build process started. Classpath: C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/jps-launcher.jar;C:/Users/pisarevv/Desktop/jdk-9/lib/tools.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/optimizedFileManager.jar;C:/Program Files (x86)/JetBrains/IntelliJ IDEA Community Edition 2016.3/lib/ecj-4.6.1.jar Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:537) at org.jetbrains.jps.cmdline.Launcher.main(Launcher.java:59) Caused by: java.lang.ExceptionInInitializerError at com.intellij.util.concurrency.AtomicFieldUpdater.<clinit>(AtomicFieldUpdater.java:41) at com.intellij.util.containers.ConcurrentIntObjectHashMap.getUnsafe(ConcurrentIntObjectHashMap.java:2787) at com.intellij.util.containers.ConcurrentIntObjectHashMap.<clinit>(ConcurrentIntObjectHashMap.java:2752) at com.intellij.util.containers.ContainerUtil.createConcurrentIntObjectMap(ContainerUtil.java:2489) at com.intellij.util.containers.ConcurrentRefValueIntObjectHashMap.<init>(ConcurrentRefValueIntObjectHashMap.java:31) at com.intellij.util.containers.ConcurrentWeakValueIntObjectHashMap.<init>(ConcurrentWeakValueIntObjectHashMap.java:31) at com.intellij.util.containers.ContainerUtil.createConcurrentIntObjectWeakValueMap(ContainerUtil.java:2530) at com.intellij.openapi.util.Key.<clinit>(Key.java:38) at org.jetbrains.jps.incremental.Utils.<clinit>(Utils.java:40) at org.jetbrains.jps.cmdline.BuildMain.main(BuildMain.java:82) ... 5 more Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private jdk.internal.reflect.ConstructorAccessor java.lang.reflect.Constructor.acquireConstructorAccessor() accessible: module java.base does not "opens java.lang.reflect" to unnamed module @4f9a3314 at java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:424) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:199) at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:192) at java.base/java.lang.reflect.Method.setAccessible(Method.java:186) at com.intellij.util.ReflectionUtil.findMethod(ReflectionUtil.java:265) at com.intellij.util.ReflectionUtil.getDeclaredMethod(ReflectionUtil.java:279) at com.intellij.util.ReflectionUtil.<clinit>(ReflectionUtil.java:422) ... 15 more
是否有人有一個想法如何解決這個或者我應該簡單地等待,直到他們釋放的另一個版本?
Nicolai!感謝這:-)。您的博客一直是特別針對Java 9以及有關Java的信息的絕佳來源。我密切關注它,你正在做一件很棒的工作。 – Vitaliy
問題:你能告訴我兩個版本有什麼區別嗎? – Vitaliy
感謝您的讚美。 :) EA構建是從Java 9代碼庫中的不同分支創建的。直到幾個月前,只有Jigsaw分支包含模塊系統。然後它被合併到主分支中,但Jigsaw分支仍然可以看到模塊系統的特性。不過,我不知道哪個特定的變化會導致麻煩。 (順便說一下,這是根本問題:'引起:java.lang.reflect.InaccessibleObjectException:無法使私人jdk.internal.reflect.ConstructorAccessor'。) – Nicolai