deepin如何安装和配置java jdk环境
Tofloor
poster avatar
spq
deepin
2017-12-16 01:57
Author
今天查阅了网上资料,按着帖子操作了一遍。但是,感觉配置了没保存(LINUX小白)。第一次用LINUX来配置环境变量。
Reply Favorite View the author
All Replies
avatar
spq
deepin
2017-12-16 02:03
#1
https://bbs.deepin.org/post/150233
https://bbs.deepin.org/post/36225

我已经下载了jdk也解压安装好了,就是没配置。
Reply View the author
avatar
要讲武德
deepin
2017-12-16 03:58
#2
http://sdkman.io/install.html
继续安利一下sdkman
安装好后:


sdk还可以安装maven gradle groovy等...
Reply View the author
Comments
GreenHat
2018-04-06 19:49
不错
jdocker
2018-03-18 21:07
我也喜欢用sdkman工具,管理各种版本的工具特方便。
avatar
HarryZhao
deepin
2017-12-16 04:07
#3
如果是用Java8的话,可以sudo apt install oracle-java8-installer
Reply View the author
avatar
spq
deepin
2017-12-16 06:19
#4
https://bbs.deepin.org/post/150233
如果是用Java8的话,可以sudo apt install oracle-java8-installer

open jdk 好像卸载不了,自己也是个LINUX小白,命令也不会。
Reply View the author
avatar
chenjazz
deepin
2017-12-17 06:30
#5
直接用openjdk就行了
Reply View the author
avatar
186******42
deepin
2017-12-17 09:57
#6
本帖最后由 chnxan 于 2017-12-17 01:58 编辑
  1. echo '\nexport M2_HOME=~/Utils/maven\nexport JAVA_HOME=~/Utils/jvm/default\nexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar\nexport PATH=$M2_HOME/bin:$JAVA_HOME/bin:$PATH' >> ~/.profile
Copy the Code

以上是我的习惯
default 是 通过ln -s 创建的指定版本jdk的软连接
/home单独分区,每次重装后就执行这个脚本
jdk版本,就官网下载tar.gz,解压即可

因为我用zsh,所以要把变量写入.profile,这样bash和zsh都读的到,至少在deepin里15.5里是这样
Reply View the author
avatar
dragonvshow
deepin
2018-03-18 03:20
#7
想用深度访问公司的一些有java的页面,不知道怎么弄。。。上网查说是linux不支持java了,导致现在都用vbox装windows再安装java来访问公司的公办页面
Reply View the author
avatar
happycat
deepin
2018-03-18 09:18
#8
https://bbs.deepin.org/post/36225
这个教程里eclipse安装出现:
Reply View the author
avatar
billy123456
deepin
2018-03-18 17:38
#9
https://bbs.deepin.org/post/150233
open jdk 好像卸载不了,自己也是个LINUX小白,命令也不会。

你这个截图是什么意思?
Reply View the author
avatar
134******40
deepin
2018-03-18 21:05
#10
https://bbs.deepin.org/post/150233
想用深度访问公司的一些有java的页面,不知道怎么弄。。。上网查说是linux不支持java了,导致现在都用vbox ...

java是跨平台的,怎么可能不支持Linux系统?你说的浏览器支持使用java applet,那是浏览器的问题(即浏览器不再支持java插件导致你说的使用java显示的网页),而java9后,java本身也废弃了Java applet支持。
Reply View the author
avatar
180******66
deepin
2018-04-06 04:28
#11
https://bbs.deepin.org/post/150233
http://sdkman.io/install.html
继续安利一下sdkman
安装好后:

为什么我安装不了,按官网用curl下载后没有那个sdkman-init.sh
Reply View the author
avatar
spq
deepin
2018-04-09 05:21
#12
https://bbs.deepin.org/post/150233
你这个截图是什么意思?

我是想把sun公司的openjdk卸载,安装oraclejdk
Reply View the author
avatar
要讲武德
deepin
2018-04-09 17:41
#13
https://bbs.deepin.org/post/150233
为什么我安装不了,按官网用curl下载后没有那个sdkman-init.sh

多安装几次? 可能服务器国外的有时候网不稳定?
Reply View the author
avatar
134******40
deepin
2018-04-09 22:29
#14
https://bbs.deepin.org/post/150233
为什么我安装不了,按官网用curl下载后没有那个sdkman-init.sh

官方的安装说明有点小问题:

  1. curl -s "https://get.sdkman.io" | bash
Copy the Code

修改成
  1. curl -s "https://get.sdkman.io" | bash -
Copy the Code

试试(后面加了一横杠"-",前面有空格)
Reply View the author