免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
Knowledge Base ? 小B的CENTOS 安裝SUN 1.6 JDK

小B的CENTOS 安裝SUN 1.6 JDK

首先從sun那里下載為linux準(zhǔn)備的jdk 1.6版update 6是我下的版本

傳到centos里后

先確認(rèn)已經(jīng)安裝有jpackage-utils

rpm -q jpackage-utils

下一步就是執(zhí)行這個(gè)下載來(lái)的安裝bin文件

chmod +x jdk-6u6-linux-i586-rpm.bin

./jdk-6u6-linux-i586-rpm.bin

接受許可,進(jìn)行安裝

安裝完后先不要急

這時(shí)如果再輸入java -version 看到的還是gcj呀

下面要做的是把sun的java做為默認(rèn)

下面是我參考的文檔

First remove /var/lib/alternatives/java file by typing;

rm /var/lib/alternatives/java

When asked press the ‘y’ key,

Now to create the new (corrected) alternatives file for java type
the following commands as root;

/usr/sbin/alternatives – - install /usr/bin/java java /usr/lib/jvm/jre-1.4.2-gcj/bin/java 1

For jre:

/usr/sbin/alternatives – - install /usr/bin/java java /usr/java/jre1.6.0/bin/java 2

For jdk:

/usr/sbin/alternatives – - install /usr/bin/java java /usr/java/jdk1.6.0_06/bin/java 2

/usr/sbin/alternatives – - config java

You should now see for example:

There are 2 programs which provide ‘java’.

Selection Command
———————————————–
1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2 /usr/java/jre1.6.0_06/bin/java

Enter to keep the current selection[+], or type selection number:

Type: <choose 1 or 2>

In the example above java is already configured correctly [*+ 2] to
use Sun’s Java, no changes are needed, just press the Enter key here.
If you have been following the instructions then you should have
the same results (version numbers may be sightly different).

Now type; /usr/sbin/alternatives – - display java

You should see for example;

java – status is manual.
link currently points to /usr/java/jre1.6.0/bin/java
/usr/lib/jvm/jre-1.4.2-gcj/bin/java – priority 1
/usr/java/jre1.6.0_06/bin/java – priority 2
Current `best’ version is /usr/java/jre1.6.0/bin/java.

Next you might want to create (or edit) /etc/profile.d/java.sh
file, examples below:

For jre;

export JAVA_HOME=”/usr/java/jre1.6.0/bin”
export JAVA_PATH=”$JAVA_HOME”
export PATH=”$PATH:$JAVA_HOME”

For jdk;

export JAVA_HOME=”/usr/java/jdk1.6.0_06/jre/bin”
export JAVA_PATH=”$JAVA_HOME”
export PATH=”$PATH:$JAVA_HOME”

When done creating or editing the file type;

source /etc/profile.d/java.sh

Now any user root or other wise should be able to use the command;

which java

and the results should read something like;

/usr/bin/java

Also any user root or other wize should be able to use the command;

java -version

and the results should read something like;

java version “1.6.0″
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

java這樣一來(lái)就裝好了

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
CentOS下安裝JDK7
Ubuntu下安裝配置JDK
用alternatives進(jìn)行java版本的轉(zhuǎn)換
Ubuntu12.04安裝jdk1.6.0_35.bin.
centos7 配置jdk替換openjdk
Ubuntu下安裝配置 JDK 7
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服