You know,If you want to develop java applications ,you’d better install jdk.

Now I will introduce you how to intall jdk1.6 on Ubuntu.

Follow me!

One

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.

Two
After file is donwloaded,we also can use command:ls to scan the file list.

Three
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

Four
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.

Five
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

Tips: sudo update-alternatives — install is used to change the priority.

OK!Now you can enter command: java -version to test if jdk is ok.

If you can see java version “1.6.0_29″--Congratulations!

Ubuntu10.4 install jdk1.6的更多相关文章

  1. ubuntu10.10手工安装jdk1.6

    声明:以下操作是在root用户下操作. 一.下载JDK首先,在Oracle的官网上下载JDK.http://www.oracle.com/technetwork/java/javase/downloa ...

  2. Ubuntu10.4 Install DB2V9.5

    1. Download the DB2V9.5 Software from URL:  http://www14.software.ibm.com/webapp/download/search.jsp ...

  3. Java 6 JVM参数选项大全(中文版)

    原文来自: http://kenwublog.com/docs/java6-jvm-options-chinese-edition.htm 本文是基于最新的SUN官方文档Java SE 6 Hotsp ...

  4. Linux下Hadoop2.6.0集群环境的搭建

    本文旨在提供最基本的,可以用于在生产环境进行Hadoop.HDFS分布式环境的搭建,对自己是个总结和整理,也能方便新人学习使用. 基础环境 JDK的安装与配置 现在直接到Oracle官网(http:/ ...

  5. 事故记录-过多进程致使CPU卡死

    早上到公司,发现邮箱内有报警信息显示CPU和IO使用都已超标.报警内容如下:主机: test-server-192.168.1.18 时间: 2015.11.15 15:25:17状态: PROBLE ...

  6. 深入理解JVM—Java 6 JVM参数配置说明

    原文地址:http://yhjhappy234.blog.163.com/blog/static/316328322011119111014657/ 使用说明< xmlnamespace pre ...

  7. Ubuntu 12.04搭建Andorid编译环境

    1.安装JDK,Android 5.0开始,开始使用OpenJDK 1.7,4.4等低版本是Oracke JDK1.6 install java environment // install open ...

  8. Spark的几种运行模式

    1.local单机模式,结果xshell可见:./bin/spark-submit --class org.apache.spark.examples.SparkPi --master local[1 ...

  9. HDFS之HBase伪分布安装

    1.HBase简介 HBase是Apache Hadoop中的一个子项目,Hbase依托于Hadoop的HDFS作为最基本存储基础单元,通过使用hadoop的DFS工具就可以看到这些这些数据 存储文件 ...

随机推荐

  1. bootstrap输入框从数据库读取数据

    https://github.com/lzwme/bootstrap-suggest-plugin

  2. 菜鸟的jQuery源码学习笔记(一)

    整个jQuery是一个自调用的匿名函数: (function(global, factory) { if (typeof module === "object" && ...

  3. Android 展示键盘时候布局被修改的问题

    解决方法,在mainfest.xml中,对那个Activity加: <activity android:name=".activity.HomeActivity"androi ...

  4. HTML中发送方式(method)中get和post的比较

    get的方式是将表单控件的控件名name和取值value信息经过编码后,通过URL发送(可以在地址栏里看到).而post则将表单的内容通过http发送.一个 get通过URL传送变量,能传送的数据总量 ...

  5. git安装及使用简介

    从源代码安装 有人觉得从源码安装 Git 更实用,因为你能得到最新的版本. 二进制安装程序倾向于有一些滞后,当然近几年 Git 已经成熟,这个差异不再显著. 如果你想从源码安装 Git,需要安装 Gi ...

  6. 【测试技术】ant在测试中的使用@文件以及目录的读写删和复制

    ant其实就是一个java的打包工具,存在的时间已经很久了,很多同行在使用中可能就是用,对为什么要用它,能够怎么用没有更多的了解: ---------------------------------- ...

  7. mysql tee 命令

    tee 命令说明: 用过mysql的应该都会知道mysql有一个叫show 的命令,这个命令应该是SQL标准之外的一个扩展:和这个类似mysql还扩展了一个叫tee的命令. tee的功能是把你的所有输 ...

  8. Nginx 教程的连载计划

    下面以教程系列为单位,列举出了已经发表和计划发表的连载教程: Nginx 新手起步 Nginx 是如何匹配 URI 的 Nginx 变量漫谈 Nginx 配置指令的执行顺序 Nginx 的 if 是邪 ...

  9. Ajax日记

    简要讲Ajax 的内容归纳为博客. AJAX能且仅能从服务器上读取文件,我们使用ajax的时候分为以下几个步骤: 1.  创建ajax对象 2.  链接服务器 3.  发送请求 4.  接收返回值 下 ...

  10. Inno Setup技巧[实例]添加自定义页面

    原文 http://hi.baidu.com/watashi/item/b3dda993459ff8f0291647a0 通过“添加自定义页面”可以丰富安装程序的功能.本文以添加一个页面“选择安装类型 ...