如何在deepin上安装Java支持环境?
Tofloor
poster avatar
ranpower
deepin
2018-12-15 05:18
Author
想玩Minecraft,无奈Minecraft是用Java编的论坛以前的帖子的方法不行,终端显示deepin@deepin-PC:~$ sudo -i
[sudo] deepin 的密码:
root@deepin-PC:~# sudo apt-get install python-software-properties
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
python-software-properties 已经是最新版 (0.96.9debian1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 73 个软件包未被升级。
root@deepin-PC:~# sudo add-apt-repository ppa:webupd8team/java
Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK8). There are no actual Java files in this PPA.

Important -> Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html

Update: Oracle Java 9 has reached end of life: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html

The PPA supports Ubuntu 18.10, 18.04, 16.04, 14.04 and 12.04.

More info (and Ubuntu installation instructions):
- http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

Debian installation instructions:
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

For Oracle Java 11, see a different PPA -> https://www.linuxuprising.com/2018/10/how-to-install-oracle-java-11-in-ubuntu.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmp46uv8p_q/pubring.gpg' created
gpg: key C2518248EEA14886: 14 signatures not checked due to missing keys
gpg: /tmp/tmp46uv8p_q/trustdb.gpg:建立了信任度数据库
gpg: 密钥 C2518248EEA14886:公钥“Launchpad VLC”已导入
gpg: 没有找到任何绝对信任的密钥
gpg: 合计被处理的数量:1
gpg:           已导入:1
gpg: 找不到有效的 OpenPGP 数据。
root@deepin-PC:~#


Reply Favorite View the author
All Replies
avatar
要讲武德
deepin
2018-12-15 06:39
#1
用sdkman 安装
Reply View the author
avatar
要讲武德
deepin
2018-12-15 06:40
#2
Reply View the author
avatar
Lotuso
deepin
2018-12-15 09:20
#3
还不如自己在官方下载JDK自己配环境
Reply View the author
avatar
ranpower
deepin
2018-12-15 17:50
#4

下什么啊这个不行啊
Installing SDKMAN! on UNIX-like platforms is as easy as ever. SDKMAN! installs smoothly on Mac OSX, Linux, Cygwin, Solaris and FreeBSD. We also support Bash and ZSH shells.
Simply open a new terminal and enter:

$ curl -s "https://get.sdkman.io" | bash
Follow the instructions on-screen to complete installation.
Next, open a new terminal or enter:

$ source "$HOME/.sdkman/bin/sdkman-init.sh"
Lastly, run the following code snippet to ensure that installation succeeded:

$ sdk version
If all went well, the version should be displayed. Something like:

  sdkman 5.0.0+51
Reply View the author
avatar
ryenang
deepin
2018-12-15 18:13
#5
https://bbs.deepin.org/post/172450
下什么啊这个不行啊
Installing SDKMAN! on UNIX-like platforms is as easy as ever. SDKMAN! inst ...

sdk install java
Reply View the author
avatar
ryenang
deepin
2018-12-15 18:16
#6
Oracle JDK或者OpenJDK 下载,解压,配置一下JAVA_HOME PATH变量就可以了
Reply View the author
avatar
an_yun
deepin
2018-12-15 18:27
#7
本帖最后由 an_yun 于 2018-12-15 12:48 编辑

deepin默认自带java运行环境的,直接java运行你文件就行。如果不放心终端执行
  1. sudo apt install default-jre
Copy the Code

然后去商店装Minecraft就行了,或者从其他地方下载,解压安装包:


然后右键终端打开,执行
  1. java -jar  HMCL-2.4.1.62.jar
Copy the Code
就出现启动器的界面,点击启动MineCraft就行了

游戏截图


Reply View the author
avatar
要讲武德
deepin
2018-12-15 18:59
#8
https://bbs.deepin.org/post/172450
下什么啊这个不行啊
Installing SDKMAN! on UNIX-like platforms is as easy as ever. SDKMAN! inst ...
  1. curl -s "https://get.sdkman.io" | bash
Copy the Code

安装sdk

  1. source "$HOME/.sdkman/bin/sdkman-init.sh"
Copy the Code

刷新sdk环境变量

  1. sdk version
Copy the Code

检测安装成功没, 能出来版本号就安装成功了

  1. sdk list java
Copy the Code

列出可用的Java版本

  1. sdk install java xxxx
Copy the Code

xxxx替换成上面一步列出的Java版本,想装那一版就装那一版
Reply View the author
avatar
ranpower
deepin
2018-12-15 19:47
#9
Reply View the author
avatar
Emmmmmmmm
deepin
2018-12-16 01:04
#10
最简单的方法:打开终端,输入sudo apt-get install oracle-java8回车执行,输入密码回车,输入y回车,静待安装完成,然后下载HMCL,右键点击,选择打开方式中有java的那个就可以了

这是我一边玩着mc一边告诉你的,保准管用
Reply View the author
avatar
ranpower
deepin
2018-12-16 17:15
#11
https://bbs.deepin.org/post/172450
最简单的方法:打开终端,输入sudo apt-get install oracle-java8回车执行,输入密码回车,输入y回车,静待 ...

噗。。。哈哈我已经自己自己配环境了......
Reply View the author
avatar
176******75
deepin
2018-12-25 02:38
#12
楼主怎么解决的 我deepin编译TensorFlow也要用到sudo add-apt-repository ppa:webupd8team/java 但是 同样报这个错误
Reply View the author