Chinaunix首页 | 论坛 | 博客
  • 博客访问: 508859
  • 博文数量: 59
  • 博客积分: 2968
  • 博客等级: 少校
  • 技术积分: 648
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-23 22:20
个人简介

IT圈泥瓦匠一枚,混迹过国产处理器圈,从事Linux BSP开发混一软件经理职务,现漂浮在云端从事OpenStack-Nova相关设计工作。

文章分类

全部博文(59)

文章存档

2014年(1)

2013年(2)

2012年(7)

2011年(26)

2010年(9)

2009年(14)

我的朋友

分类: LINUX

2013-09-03 21:04:40

Debian ships with OpenJDK by the default, but the Sun(now Oraclel)JDK have removed from repositories as a result of a new redistribution license recently. So
it is not possible to install Oracle Java SDK from Debian's repo. The following step will tell you how to install Oracle Java SDK without Debian repo manual.
 
My platform
Hardware : Lenovo T420 (CPU I5, DIMM 6GB, SSD 128GB+512GB, NVS4200+intel)
Software : Debian wheezy amd64

This guide assumes 64bit Java7, and the machine has no other version Java.

Download

First you need to download the lastest Java SE SDK version. Go to the following link and download the file jdk-7u25-linux-x64.tar.gz(maybe a later update vaailable)


Install 
Once download has completed, extract it into the /opt directory(new need root permission). To do this, open a new root terminal and run the below commands:

点击(此处)折叠或打开

  1. # update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_03/bin/java 1
  2. # update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_03/bin/javac 1
  3. # update-alternatives --set java /opt/jdk1.7.0_03/bin/java
  4. # update-alternatives --set javac /opt/jdk1.7.0_03/bin/javac
That's it!
Note: Debian already has a pattern for managing different software version on the same system. When you install a software manual, you could configurate the software
for system by the method.

Test

To see which version of Java you are new running by default, execute the following command from a new terminal:
#java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)


阅读(2505) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~