求指导:2015java 到底怎么安装?
Tofloor
poster avatar
jesonzhuang
deepin
2016-01-13 22:18
Author
如题。之前用2014.3  下载jdk  解压   然后在 /etc/profile  配置一下   JAVA_HOME,这样所有IDE就能自动检测到,但是现在好像不行了,试过 ~/.bash_rs   ~/.bash_profile  ~/.profile
/etc/profile  好像都不行,但是在终端中  java -version  正常,echo $JAVA_HOME 也正常, 问题是ide就是找不到  提示未设置JAVA_HOME
Reply Favorite View the author
All Replies
avatar
jesonzhuang
deepin
2016-01-13 22:19
#1
不要说  使用 ppa安装的 方法
Reply View the author
avatar
somethingbad
deepin
2016-01-13 22:43
#2
别忘了,还有一个地方需要设置:/home/你的用户名/.profile
Reply View the author
avatar
somethingbad
deepin
2016-01-13 22:45
#3
还有,除了要加JAVA_HOME以外,还要加
JDK_HOME=JDK路径
JRE_HOME=JRE路径
PATH=$PATH:JDK_HOME:JRE_HOME:JAVA_HOME
才可以保证IDE正确识别JDK
Reply View the author
avatar
jesonzhuang
deepin
2016-01-13 22:53
#4
https://bbs.deepin.org/post/36000
还有,除了要加JAVA_HOME以外,还要加
JDK_HOME=JDK路径
JRE_HOME=JRE路径

谢谢  不过我的已经都设置过了   但是好像没用  你的可以么
Reply View the author
avatar
somethingbad
deepin
2016-01-13 22:55
#5
可以的,我用IntelliJ都没问题的
Reply View the author
avatar
somethingbad
deepin
2016-01-13 22:56
#6
/home/你的用户名/.profile
这儿你设置了吗?
Reply View the author
avatar
jesonzhuang
deepin
2016-01-13 23:58
#7
https://bbs.deepin.org/post/36000
/home/你的用户名/.profile
这儿你设置了吗?

设置过了 但是好像没用   一直没弄好  所以 现在还是用的2014.3  好多东西需要迁移
Reply View the author
avatar
shulun743
deepin
2016-01-14 00:00
#8
http://www.cnblogs.com/xusir/archive/2013/09/17/3325965.html

试试 这个 老麻烦了

我就是照着这个 配置成功的
Reply View the author
avatar
8***8@qq.com
deepin
2016-01-14 00:24
#9
有没有eclipse成功找到jvm的,我之前在ubuntu上配的就没找到,现在在deepin下配又找不到,是不是eclipse的bug?
Reply View the author
avatar
zhang12345shun
deepin
2016-01-17 09:08
#10
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
#11
参考官网:
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