1. 程式人生 > >Install Java6 JDK on Ubuntu 12.04

Install Java6 JDK on Ubuntu 12.04

最近要compile Jelly Bean,發現原本使用的OpenJdk不能用,會出現Java的錯誤訊息。找了很久都只找到一些連結下載JDK的方式,但這次,Ubuntu跟Java直接不能下載了。只好嘗試手動安裝。步驟如下:

1. 上Sun Java的網站下載Java6 JDK,我下載的是Java1.6.0_35版。

2. 改變下載檔的許可權成可執行,chmod +x 6uxxx-linux-x64.bin。

3. 執行6uxxx-linux-x64.bin,會在當下的目錄裡建立一個名為 jdk.6.0.xxx的目錄。

4. 將程式建立的目錄更名為 java-6-oracle

5. 將Java-6-orcale複製到  /usr/lib/jvm下。

6. 建立一個索引檔,名為 ".java-6-orcale.jinfo",內容請參照OpenJDK的方式建立。

7.下載Switch Java的程式,如下:

wget http://webupd8.googlecode.com/files/update-java-0.5b
chmod +x update-java-0.5b
sudo ./update-java-0.5b

8. 執行update-ava-0.5b後,會列出目前你係統上所有的Java版本,選擇Java-6-orcale,並按OK。

enter image description here

9. 這樣就會將你係統上的Java改成java6了。可以在terminal下執行   java -version,確認版本。

10. 可參考下列網站,安裝Java jdk

http://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6


相關推薦

Install Java6 JDK on Ubuntu 12.04

最近要compile Jelly Bean,發現原本使用的OpenJdk不能用,會出現Java的錯誤訊息。找了很久都只找到一些連結下載JDK的方式,但這次,Ubuntu跟Java直接不能下載了。只好嘗試手動安裝。步驟如下: 1. 上Sun Java的網站下載Java6 J

How to Install Git on Ubuntu 12.04

FROM: https://www.digitalocean.com/community/articles/how-to-install-git-on-ubuntu-12-04 How to Install Git on Ubuntu 12.04 About Git Git

Install greenplum cluster on ubuntu 16.04

greenplum cluster ubuntu 規劃:1個msater, 2個segments環境:ubuntu 16.04Greenplum Version: 'postgres (Greenplum Database) 5.3.0 build 2155c5a-oss1、安裝sudo

install mysql-8 on ubuntu 18.04 LTS

** How to install mysql-8 on ubuntu 18.04 LTS ** step1: you should download mysql-apt-config in the web: https://dev.mysql.com/downloads/fil

Install Splunk 7 on Ubuntu 16.04.5

sof names b- targe target reboot des osd kconfig Splunk on Ubuntu 16.04 change interface name to normalvi /etc/default/grubadd net.ifnam

Ubuntu 12.04 安裝 sun-java6-jdk

Ubuntu 10.04 LTS 安裝 sun-java6-jdk ,出現錯誤。 Reading package lists... Done Building dependency tree    Reading state information... Done

解決ubuntu 12.04 不能安裝sun-java6-jdk的方法

1. 在/etc/apt/sources.list 末尾加上如下行: ###for install Java6 deb http://ppa.launchpad.net/ferramroberto/java/ubuntu natty main 2. sudo apt

Ubuntu上安裝sublime 3 ,how to install sublime 3 text on Ubuntu 18.04

sta ans tran repos date 8.0 ensure pos http apt Install the GPG key: wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo

How to Install PhantomJS on Ubuntu 16.04

down location bz2 man complete req see ati sed Introduction PhantomJS is a scripted, headless browser that can be used for automating we

How to Install FFmpeg on Ubuntu 18.04 & 16.04

FFmpeg is a cross-platform solution for streaming audio and video as well as recording and conversion. It’s also useful to convert

How to Install Pip on Ubuntu 14.04 LTS

遇到有一個舊的 VM使用 Ubuntu 14,發現居然預設無法使用pip,下了指令: sudo apt-get install python-pip 無效,會顯示 error 使用 apt-get update 先更新過清單也一樣. 解法: curl "https://bootstrap.pypa.i

Install Scala and SBT using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get

sudo apt-get remove scala-library scala sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb sudo dpkg -i scala-2.10.4.deb sudo ap

ubuntu 12.04 解壓安裝jdk

ubuntu下解壓安裝jdk,簡單方便,分享一下安裝方法: 注:該方法針對新系統,之前沒有配置過jdk的情況。 1、下載對應版本的jdk壓縮包,如 jdk-8u5-linux-x64.gz 2、解壓 tar -zxvf jdk-8u5-linux-x64.gz

How To Install Apache Tomcat 8 on Ubuntu 16.04

Introduction Apache Tomcat is a web server and servlet container that is used to serve Java applications. Tomcat is an open source implementation of the J

Ubuntu中安裝和配置 Java JDK,並解除安裝自帶OpenJDK(以Ubuntu 12.04為例)

1.下載jdk-7u25-linux-i586.tar.gz 2.修改jdk-7u25-linux-i586.tar.gz的可執行許可權,最簡單的方法是賦予許可權,即: chmod 755 jdk

How to Install FFmpeg on Ubuntu 18.04 & 16.04

FFmpeg is a cross-platform solution for streaming audio and video as well as recording and conversion. It’s also useful to convert multimedia file

Install Google Chrome Web Browser on Ubuntu 18.04

star linux cto ron all nag web process and Download the latest Google Chrome .deb package with wget: sudo wget https://dl.google.com/linu

Ubuntu 12.04 install JDK1.8.0_25

1、download JDK 8 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 2、tarball $ sudo mkdir /usr/lib/jvm

Install CuDNN on Ubuntu 16.04?

Step 0: Install cuda from the standard repositories. Step 1: Register an nvidia developer account and download cudnn here (about 80 MB) Step 2: Check whe

Ubuntu 12.04系統中安裝jdk和配置tomcat伺服器

Ubuntu自帶的jdk版本是OpenJDK,即如下圖所示:     為了完成老師佈置的J2EE作業,不得自己配置J2EE環境,要重新安裝JDK。第一次在linux環境下接觸這些東西,參考了許多的網上資源,最終還是成功了。下面就是具體的操作。 準備     我