debian – 如何将JAVA_HOME公开给在X和/或Gnome下运行的应用程序?
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了debian – 如何将JAVA_HOME公开给在X和/或Gnome下运行的应用程序?,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1490字,纯文字阅读大概需要3分钟。
内容图文
![debian – 如何将JAVA_HOME公开给在X和/或Gnome下运行的应用程序?](/upload/InfoBanner/zyjiaocheng/739/7b81ca5495aa47b8822b249aa8cadb04.jpg)
我正在尝试从Gnome3的Applications菜单运行IntelliJ,但它抱怨没有设置JAVA_HOME变量.
我在我的主文件夹下安装了Java.
我设法在?/ .bashrc中导出变量:
export JAVA_HOME=~/jdk1.6.0_32
我从命令行成功运行了IntelliJ.
我认为配置被忽略是正常的,因为Gnome不应该假设我们正在使用bash,不是吗?
我希望.profile是正确的使用场所,但它似乎没有任何影响.
解决方法:
根据?/ .pam_environment或/ etc / environment中的Ubuntu’s Wiki on Environment Variables,取决于您对所有用户或仅用户的需求.
Session-wide environment variables
Environment variable settings that should affect just a particular user (rather then the system as a whole) should be set into:
~/.pam_environment
– This file is specifically meant for setting a user’s environment. It is not a script file, but rather consists of assignment expressions, one per line.Note: Using
.pam_environment
requires a re-login in order to initialize the variables. Restarting just the terminal is not sufficient to be able to use the variables.
和
System-wide environment variables
Environment variable settings that affect the system as a whole (rather then just a particular user) should not be placed in any of the many system-level scripts that get executed when the system or the desktop session are loaded, but into
/etc/environment
– This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line. Specifically, this file stores the system-wide locale and path settings.
内容总结
以上是互联网集市为您收集整理的debian – 如何将JAVA_HOME公开给在X和/或Gnome下运行的应用程序?全部内容,希望文章能够帮你解决debian – 如何将JAVA_HOME公开给在X和/或Gnome下运行的应用程序?所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。