java --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.0 (Ubuntu 4.1.0-1ubuntu8)
上面提示java版本是1.4.2
sudo apt-get install sun-j2re1.5
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
sun-j2re1.5 已经是最新的版本了。
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 1 个软件未被升级。
这里是1.5
请问我的java版本正常吗?我的java不是从官方的源获得的
谢谢
我的java版本正常吗?(已解决)
-
- 帖子: 131
- 注册时间: 2006-03-12 17:01
我的java版本正常吗?(已解决)
上次由 dida 在 2006-05-01 21:08,总共编辑 1 次。
- leal
- 帖子: 1119
- 注册时间: 2005-08-29 14:49
- 来自: 杭州
- 联系:
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
-
- 帖子: 131
- 注册时间: 2006-03-12 17:01
谢谢oneleaf,我这儿有这样的提示:
sudo update-alternatives --config java
There are 4 alternatives which provide `java'.
Selection Alternative
-----------------------------------------------
+ 1 /usr/lib/jvm/java-gcj/bin/java
* 2 /usr/lib/j2re1.5-sun/bin/java
3 /usr/bin/gij-wrapper-4.1
4 /etc/alternatives/kaffe-system/bin/java
我应该怎么做呢?好象没有sdk字样
sudo update-alternatives --config java
There are 4 alternatives which provide `java'.
Selection Alternative
-----------------------------------------------
+ 1 /usr/lib/jvm/java-gcj/bin/java
* 2 /usr/lib/j2re1.5-sun/bin/java
3 /usr/bin/gij-wrapper-4.1
4 /etc/alternatives/kaffe-system/bin/java
我应该怎么做呢?好象没有sdk字样
-
- 帖子: 131
- 注册时间: 2006-03-12 17:01
- zhan
- 帖子: 1880
- 注册时间: 2005-08-15 0:04
- 来自: 南7技校
-
- 帖子: 6
- 注册时间: 2006-06-05 22:26
Java Installation
This page provides steps to install Java SDK 1.5
Download the most recent version of JDK (without NetBeans or J2EE) from java.sun.com. Select the Linux RPM in self-extracting file.
Make the downloaded file executable, and then run it:
chmod +x jdk-1_5_0_06-linux-i586-rpm.bin
./jdk-1_5_0_06-linux-i586-rpm.bin
Press space bar to view the copyright terms, and at the end, type in yes to agree to the terms.
Scripts stored in /etc/profile.d are called as a part of initialization when a new shell is created. We will use this procedure to set two important environmental variables related to java. Create /etc/profile.d/java.sh with the following contents. (Correct the pathname to match your version of java.)
export JAVA_HOME=/usr/java/jdk1.5.0_06
export PATH=${JAVA_HOME}/bin:${PATH}
Make the script executable.
chmod +x /etc/profile.d/java.sh
This page provides steps to install Java SDK 1.5
Download the most recent version of JDK (without NetBeans or J2EE) from java.sun.com. Select the Linux RPM in self-extracting file.
Make the downloaded file executable, and then run it:
chmod +x jdk-1_5_0_06-linux-i586-rpm.bin
./jdk-1_5_0_06-linux-i586-rpm.bin
Press space bar to view the copyright terms, and at the end, type in yes to agree to the terms.
Scripts stored in /etc/profile.d are called as a part of initialization when a new shell is created. We will use this procedure to set two important environmental variables related to java. Create /etc/profile.d/java.sh with the following contents. (Correct the pathname to match your version of java.)
export JAVA_HOME=/usr/java/jdk1.5.0_06
export PATH=${JAVA_HOME}/bin:${PATH}
Make the script executable.
chmod +x /etc/profile.d/java.sh