Pycharm 安装时 java 崩溃

Pycharm 安装时 java 崩溃

我尝试使用 pycharm/bin/pycharm.sh 安装 pycharm 并将其定位在 Linux mint 18(32 位)上的 /usr/bin/share 中,这是出现的错误,我已经安装了 openjdk-9-jdk和 openjdk-9-jre。我不知道出了什么问题。如有任何帮助,我们将不胜感激,并提前致谢。

WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$AppClassLoader
WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$PlatformClassLoader
WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$AppClassLoader
WARN: Unknown class loader: jdk.internal.loader.ClassLoaders$PlatformClassLoader
Jul 15, 2017 3:18:44 PM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /root/.java/.userPrefs/prefs.xml

Start Failed: Internal error. Please report to http://jb.gg/ide/critical-startup-errors

com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
    at com.intellij.ide.plugins.PluginManager.a(PluginManager.java:94)
    at java.lang.Thread.run(java.base@9-internal/Thread.java:804)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
    at com.intellij.ide.plugins.PluginManager.a(PluginManager.java:91)
    ... 1 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.intellij.util.concurrency.AppScheduledExecutorService$Holder
    at com.intellij.util.concurrency.AppScheduledExecutorService.getInstance(AppScheduledExecutorService.java:50)
    at com.intellij.util.concurrency.AppExecutorUtil.getAppScheduledExecutorService(AppExecutorUtil.java:39)
    at com.intellij.util.concurrency.AppExecutorUtil.getAppExecutorService(AppExecutorUtil.java:53)
    at org.jetbrains.ide.PooledThreadExecutor.<clinit>(PooledThreadExecutor.java:32)
    at com.intellij.ide.a.m.u.<init>(u.java:63)
    at com.intellij.ide.a.e.b.<init>(b.java:23)
    at com.intellij.idea.MainImpl.a(MainImpl.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
    at com.intellij.idea.MainImpl.access$000(MainImpl.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
    at com.intellij.idea.MainImpl$1.start(MainImpl.java:48)
    at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:147)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
    at com.intellij.idea.MainImpl.start(MainImpl.java:40)
    ... 6 more

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb65e2e48, pid=2734, tid=2753
#
# JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195526.buildd.src)
# Java VM: OpenJDK Server VM (9-internal+0-2016-04-14-195526.buildd.src, mixed mode, tiered, concurrent mark sweep gc, linux-x86)
# Problematic frame:
# C  [libjava.so+0x18e48]  JNU_GetEnv+0x18
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /root/java_error_in_PYCHARM_2734.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted

答案1

PyCharm 不支持 JDK9因为它不稳定。尝试JDK8

答案2

尝试使用 Orcale 的真正 JDK,而不是 OpenJDK(正如您在错误消息中看到的那样,这是后者的一个错误)。幸运的话,较旧的 OpenJDK 就可以了,但根据我的经验,OpenJDK 通常经常出现问题,所以只能坚持使用 Oracle JDK(不幸的是)。

相关内容