h3. Download SE for 64 bit for [oracle|http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html]
h3. Copy to directory and link
{code}
mv /home/Andy/IBMS/lib/jdk/jdk7_25/jdk1.7.0_25 /usr/java
unlink latest
unlink default
ln -s /usr/java/jdk1.7.0_25 latest
ln -s /usr/java/latest default
{code}
h3. Setup the run position
{code}
update-alternatives --install "/usr/bin/java" "javac" "/usr/java//jdk1.7.0_25/bin/javac" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/java//jdk1.7.0_25/bin/javac" 1
update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/java//jdk1.7.0_25/bin/javaws" 1
[root@localhost java]# update-alternatives --config java
有 3 程式提供 'java'。
選擇 指令
-----------------------------------------------
1 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
*+ 2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
3 /usr/java//jdk1.7.0_25/bin/java
請輸入以保留目前的選擇[+],或輸入選擇號碼:3
[root@localhost java]# update-alternatives --config javac
[root@localhost java]# update-alternatives --config javaws
{code}
h3. Setting Eclipse used JDK7
Choose Window->Preference, then click following content
h3. Setting project replace jdk6 to jdk7
your_Project (click mouse right button)-> properties \-> java build path \-> edit
Reference:
[How do I install Oracle Java JDK 7?|http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7]
[Eclipse update|http://stackoverflow.com/questions/12588537/how-to-change-jdk-version-for-an-eclipse-project]
Reference:
[How do I install Oracle Java JDK 7?|http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7]
沒有留言:
張貼留言