怎么配置java环境变量啊= =
Tofloor
poster avatar
x806393858
deepin
2015-12-28 20:07
Author
以前用ubuntu好像直接就配置好的= =改用deepinjiu不知道咋整- -明明有管理员权限了还是提示说没有权限
Reply Favorite View the author
All Replies
yoqu
deepin
2015-12-28 20:49
#1
下载好jdk后
修改环境变量,编辑/ect/profile文件,将变量添加进去就好了
Reply View the author
x806393858
deepin
2015-12-28 21:19
#2
https://bbs.deepin.org/post/34782
下载好jdk后
修改环境变量,编辑/ect/profile文件,将变量添加进去就好了

他提示说权限不够啊
Reply View the author
yoqu
deepin
2015-12-29 05:14
#3
https://bbs.deepin.org/post/34782
他提示说权限不够啊

使用sudo啊
  1. sudo gedit /etc/profile
Copy the Code

用这个命令编辑,然后保存重启就好了。不过我保存的变量重启不生效,不知道啥原因,保存在~/.bashrc中就可以
Reply View the author
zhang12345shun
deepin
2016-01-17 09:12
#4
1. 下载Sun版JDK压缩包(.tar.gz),选择其中的32/64位Linux版本。
2. 将其解压缩:sudo tar -zxvf ~/Downloads/jdk-8u45-linux-i586.tar.gz -C /usr/lib 中参数-C后面的路径是解压缩的目标路径。
3.sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_66/bin/java 1000
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_66/bin/javac 1000
Reply View the author
zhang12345shun
deepin
2016-01-17 09:42
#5
参考官网:
Starting with version 8u40, the JDK installation is integrated with the alternatives framework and after installation, the alternatives framework is updated to reflect the binaries from the recently installed JDK. Java commands such as java, javac, javadoc, and javap can be invoked from the command line.
Reply View the author
yutent
deepin
2016-01-17 14:25
#6
It has been deleted!