商店里没有java,如何手动安装?
Tofloor
poster avatar
jd808
deepin
2016-01-16 23:46
Author
RT
Reply Favorite View the author
All Replies
avatar
u855697021
deepin
2016-01-17 00:08
#1
本帖最后由 u855697021 于 2016-1-16 16:11 编辑

Orcale闭源官方版本:https://www.java.com/zh_CN/download/linux_manual.jsp(中间的那两个,另外Orcale就这么鄙视debian系发行版么?)
OpenJDK开源版本:终端执行sudo apt-get install openjdk-8-jre
Reply View the author
avatar
FzcNeo
deepin
2016-01-17 00:22
#2
本帖最后由 FzcNeo 于 2016-1-16 16:24 编辑

下载jdk压缩包http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
解压到/usr/local
编辑/etc/profile,在文件最后加入下面内容
  1. export JAVA_HOME=/usr/local/jdk_dir/
  2. export PATH=$JAVA_HOME/bin:$PATH
Copy the Code

其中jdk_dir换成你解压后的文件夹名字
重启之后生效
Reply View the author
avatar
jd808
deepin
2016-01-17 00:32
#3
已经弄好了,谢谢
Reply View the author
avatar
jd808
deepin
2016-01-17 00:33
#4
https://bbs.deepin.org/post/36179
Orcale闭源官方版本:https://www.java.com/zh_CN/download/linux_manual.jsp(中间的那两个,另外Orcale就 ...

为啥软件中心搜索不到openjdk???
Reply View the author
avatar
u855697021
deepin
2016-01-17 00:35
#5
https://bbs.deepin.org/post/36179
为啥软件中心搜索不到openjdk???

apt-cache search openjdk一抓一大把啊...当然,不是在商店里面,要用命令行安装...貌似商店不收录非图形界面软件...
Reply View the author
avatar
shulun743
deepin
2016-01-17 00:36
#6
https://bbs.deepin.org/post/36179
为啥软件中心搜索不到openjdk???

似乎叫  openjava
Reply View the author
avatar
zhang12345shun
deepin
2016-01-17 09:07
#7
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
avatar
zhang12345shun
deepin
2016-01-17 09:41
#8
参考官网:
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