You know,If you want to develop java applications ,you'd better install jdk.
Today,I will introduce you how to intall jdk1.6 on Ubuntu.Just follow me step by step.
First step
you should download jdk file from sun offcial website,
URL: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u29-download-513648.html (fixed)
fileName : jdk-6u29-linux-i586.bin
Tips: 1)Before you will download this file ,you should accept license agreement.
2)If your system is Ubuntu10.4 or other 32-bit system,you can't download the jdk-6u29-linux-x64.bin.When you use sudo sh jdk-6u29-linux-x64.bin,it will create a file that file's name is invalid encoding.
Second step
after file is donwloaded,we also can use command
ls
to scan the file list.
Third step
OK,now we can install jdk,write command :
sudo sh jdk-6u29-linux-i586.bin
A few miniutes later,you will be asked to press Enter key,Just do, You will see 'Done'.
Ok,Now jdk has been instaled by us,next step we will config environment variables for java
Fourth step
enter the command :
sudo gedit /etc/environment
if you are similar with vim,you can use the command :
sudo vi /etc/environment
Add the following lines in the end of file.
export JAVA_HOME=/home/alicus/Downloads/jdk1.6.0_29
export JRE_Home=>/home/alicus/Downloads/jdk1.6.0_29/jre
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
then enter command :
source ~/.bashrc
it makes the changes effective
Fifth Step
You should know Ubuntu10.4 make the openjdk as its default jdk ,so we should make sun jdk to be
the default one,just use following commands :
sudo update-alternatives --install /usr/bin/java java /home/alicus/Downloads/jdk1.6.0_29/bin/java 300
sudo update-alternatives --install /usr/bin/java java /home/alicus/Downloads/jdk1.6.0_29/bin/javac 300
use following command to scan the jdk priority:
sudo update-alternatives --config java to
Tips: sudo update-alternatives -- install is used to change the priority.
OK!Now you can enter
java -version
to test if jdk is ok.
If you can see java version "1.6.0_29",Congratulations!!
If you have any questions,just contact me.
Email:alicus890824@gmail.com
分享到:
相关推荐
超详细在Ubuntu下安装JDK图文解析 我们选择的是jdk1.6.0_30版本。安装文件名为jdk-6u30-linux-i586.bin.
mac for jdk1.6 jdk6 安装版 里面有两个jdk1.6的安装包,都可以用 如果电脑上安装有1.7,1.8等高版本jdk就不要再下安装包了,安装包安装会报错 命令是这个:brew install java6或 brew install homebrew/cask-...
aspose-words-15.8.0-jdk1.6aspose-words-15.8.0-jdk1.6aspose-words-15.8.0-jdk1.6aspose-words-15.8.0-jdk1.6aspose-words-15.8.0-jdk1.6aspose-words-15.8.0-jdk1.6aspose-words-15.8.0-jdk1.6aspose-words-...
ubuntu下安装jdk1.6的过程,包括报错的处理等
1.okhttp3.8源码使用jdk1.6重新编译,已集成了okio,在javaweb项目中使用,未在安卓项目中使用 2.okhttp3.8源码使用jdk1.6重新编译_okhttp3.8.0-jdk1.6.jar
JDK 1.6 JDK 1.6 JDK 1.6 JDK 1.6 JDK 1.6 winxp专用 winxp专用winxp专用winxp专用winxp专用winxp专用
JDK 1.6 绿色版,我想很多人可能都需要,这是分卷4,剩下的分卷地址如下: JDK 1.6 绿色版 2 http://download.csdn.net/source/1502201 JDK 1.6 绿色版 3 http://download.csdn.net/source/1502209 JDK 1.6 绿色版...
适合okhttp,okio JDK1.6:okhttp3.8.0-jdk1.6.jar JDK1.6+:okhttp-3.12.13.jar;okio-1.15.0.jar 适用于Java开发环境、使用OkHttp调用
IBM JDK1.6 安装版
解决JDK1.6下的sun的Base64不可用情况。
JDK1.6API。java1.6开发文档,最新官网文档。满足java开发需求
JDK1.6百度云下载,里面有qq号,要是链接失效了,可以找我
支持JDK1.6,并且仅在1.6版本中使用,将URL生成二维码。压缩包内包括源码,是在zxing-zxing-3.3.0基础上做的适配,以支持jdk1.6。
ZxingUtil生成二维码适用JDK1.6及以下,自己使用JDK1.6,生成的二维码为彩色
jdk1.6jar jdk1.6.0_39.zip
当需要一键安装JDK1.6时,可使用本工具,经测试,100%好用。 注意点: 1、如果一台电脑上没有安装过jdk,则执行本目录中的installjdk.bat 将安装目录中的jdk-6u43-windows-i586.exe这个文件。 如果已经安装过JDK,...
Windows JDK 1.6 安装包,解压后直接双击安装,简单易用。 下面是Oracle官网对 Java 的介绍:Oracle Java is the #1 programming language and development platform. It reduces costs, shortens development time...
java 官方原版 jdk 1.6
linux 64位IBM JDK1.6