我刚刚在 Ubuntu 中使用 sudo apt-get install openjdk-6-jdk
命令安装了 JDK,安装后Java bin
目录在哪里?以及如何设置该目录的环境路径?我对 Ubuntu 没有什么经验,谁能给点建议或推荐任何好的网站以供参考?
I just installed JDK in Ubuntu with sudo apt-get install openjdk-6-jdk
command,
after the installation where's the Java bin
directory located? And how can I set the environment path for that directory? I have little experience with Ubuntu, can anyone give some advice or suggest any good website for reference?
设置环境变量如下
编辑系统路径文件/etc/profile
Edit the system Path file /etc/profile
sudo gedit /etc/profile
在末尾添加以下行
JAVA_HOME=/usr/lib/jvm/jdk1.7.0
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
然后注销并登录 ubuntu 以设置路径...
Then Log out and Log in ubuntu for setting up the paths...
这篇关于如何在 Ubuntu 中设置 Java 环境路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!