Проблема с установкой PhpStorm на Debian Linux 64bit
Следуя инсталл-гайду, запускаю # ./phpstorm.sh
После чего вижу:
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
No protocol specified
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:182)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.X11.XToolkit.(XToolkit.java:89)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.Toolkit$2.run(Toolkit.java:834)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
at com.intellij.ui.AppUIUtil.updateFrameClass(AppUIUtil.java:81)
at com.intellij.idea.MainImpl.start(MainImpl.java:46)
... 6 more
ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:182)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.X11.XToolkit.(XToolkit.java:89)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.Toolkit$2.run(Toolkit.java:834)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
at com.intellij.ui.AppUIUtil.updateFrameClass(AppUIUtil.java:81)
at com.intellij.idea.MainImpl.start(MainImpl.java:46)
... 6 more
ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
java.lang.AssertionError: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:50)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:65)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:186)
at java.lang.Thread.run(Thread.java:662)
Как это исправить?
После чего вижу:
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
No protocol specified
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:182)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.X11.XToolkit.(XToolkit.java:89)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.Toolkit$2.run(Toolkit.java:834)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
at com.intellij.ui.AppUIUtil.updateFrameClass(AppUIUtil.java:81)
at com.intellij.idea.MainImpl.start(MainImpl.java:46)
... 6 more
ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:182)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at sun.awt.X11.XToolkit.(XToolkit.java:89)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.Toolkit$2.run(Toolkit.java:834)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826)
at com.intellij.ui.AppUIUtil.updateFrameClass(AppUIUtil.java:81)
at com.intellij.idea.MainImpl.start(MainImpl.java:46)
... 6 more
ERROR: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
java.lang.AssertionError: Error while accessing com.intellij.idea.MainImpl.start with arguments: []
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:50)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:65)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:186)
at java.lang.Thread.run(Thread.java:662)
Как это исправить?
1 ответов
Если проблема действительно с OpenJDK, как предположил Stalin, возможно поможет следующее:
скачайте Java под Вашу платформу с сайта Oracle, например, jre-7u10-linux-x64.tar.gz.
Распакуйте куда Вам удобно, например, в /home/user/jre1.7.0_10/ и в файле to_phpstorm_path/PhpStorm/bin/phpstorm.sh добавьте в начало следующие строки:
JDK_HOME=/home/user/jre1.7.0_10
export JDK_HOME
т.е. должно получиться:
#!/bin/sh
#
# ---------------------------------------------------------------------
# PhpStorm startup script.
# ---------------------------------------------------------------------
#
JDK_HOME=/home/user/jre1.7.0_10
export JDK_HOME
P.S. Я сам пользуюсь таким способом, т.к. у меня всего 2 java-программы, то устанавливать java в систему не вижу смысла, получается portable-версия. Единственный недостаток, который я вижу, это то, что нужно мониторить обновления Java вручную.