bash Webstorm桌面启动器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16135843/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Webstorm desktop launcher
提问by user2305125
I'm trying to get a working desktop launcher for Webstorm (applicable to any JetBrains product, however.) I've tried using the built-in menu "Add desktop launcher" in both Xubuntu and Lubuntu with no dice.
我正在尝试为 Webstorm 获得一个可用的桌面启动器(然而,它适用于任何 JetBrains 产品。)我尝试在 Xubuntu 和 Lubuntu 中使用内置菜单“添加桌面启动器”而没有骰子。
Running ./webstorm.sh from a terminal in the application's folder works fine.
从应用程序文件夹中的终端运行 ./webstorm.sh 工作正常。
If I add the option to the .desktop file to run in terminal I get an error message:
如果我将选项添加到 .desktop 文件以在终端中运行,我会收到一条错误消息:
ERROR: cannot start WebStorm. No JDK found. Please validate either WEBIDE_JDK, JDK_HOME or JAVA_HOME environment variable >points to valid JDK installation.
Press Enter to continue.
错误:无法启动 WebStorm。未找到 JDK。请验证 WEBIDE_JDK、JDK_HOME 或 JAVA_HOME 环境变量 > 指向有效的 JDK 安装。
按 Enter 继续。
If I open a terminal and do javac -version I get a response, indicating my path is set correctly.
如果我打开一个终端并执行 javac -version 我会得到一个响应,表明我的路径设置正确。
What gives? I am baffled as to what I'm doing wrong.
是什么赋予了?我对我做错了什么感到困惑。
回答by rzymek
Set JAVA_HOMEin your ~/.profilelike this:
设置JAVA_HOME在您~/.profile这样的:
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/
Then restart your system (or just X-Windows using sudo /etc/init.d/gdm restart).
然后重新启动您的系统(或仅使用 X-Windows sudo /etc/init.d/gdm restart)。

