Now I'm trying to configure IntelliJ to play with OpenJDK 9, which I downloaded and installed from here . I got a 64 bit version of Windows. I added JDK 9 by going to the project structure and adding the C: \ Program Files \ Java \ jdk-9 directory as the new SDK. Everything looks great and normal until I try to run the program, then it will happen.
Error:Internal error: (java.lang.NoClassDefFoundError) Could not initialize class java.lang.management.ManagementFactory$PlatformMBeanFinder java.lang.NoClassDefFoundError: Could not initialize class java.lang.management.ManagementFactory$PlatformMBeanFinder at java.lang.management.ManagementFactory.getPlatformMXBeans(ManagementFactory.java:684) at java.lang.management.ManagementFactory.getMemoryPoolMXBeans(ManagementFactory.java:392) at com.intellij.openapi.util.LowMemoryWatcher.<clinit>(LowMemoryWatcher.java:84) at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:118) at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:126) at org.jetbrains.jps.incremental.storage.AbstractStateStorage.createMap(AbstractStateStorage.java:136) at org.jetbrains.jps.incremental.storage.AbstractStateStorage.<init>(AbstractStateStorage.java:41) at org.jetbrains.jps.incremental.storage.TimestampStorage.<init>(TimestampStorage.java:36) at org.jetbrains.jps.incremental.storage.ProjectTimestamps.<init>(ProjectTimestamps.java:36) at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:90) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:266) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:232) at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1158) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:632) at java.lang.Thread.run(Thread.java:804)
Has anyone else encountered this problem and found a way to use JDK 9 with IntelliJ?
source share