Introduction:
- Official website: http://www.oracle.com/technetwork/java/javase/overview/index.html
- Download: http://www.oracle.com/technetwork/java/javase/downloads/index.html
- Document: http://www.oracle.com/technetwork/java/javase/documentation/index.html
- API: http://www.oracle.com/technetwork/java/javase/documentation/api-jsp-136079.html
Installation:
- Reference: http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/
- Reference: http://www.devsniper.com/how-to-update-sun-jdk-7-on-ubuntu-12-04/
- [Comment] Download the tarball and extract it
- [Comment] First, visit the download page and choose the one suitable for your system
- sp@simple-plan:~$ tar -zxvf jdk-7u9-linux-i586.tar.gz
- [Comment] Install Java
- sp@simple-plan:~$ sudo mkdir -p /usr/local/jvm
- sp@simple-plan:~$ sudo mv ./jdk1.7.0_09 /usr/local/jvm
Linking relationship:
- [Comment] Maintain symbolic links
- sp@simple-plan:~$ sudo update-alternatives --install /usr/local/bin/javac javac /usr/local/jvm/jdk1.7.0_09/bin/javac 1
- sp@simple-plan:~$ sudo update-alternatives --install /usr/local/bin/java java /usr/local/jvm/jdk1.7.0_09/bin/java 1
- sp@simple-plan:~$ sudo update-alternatives --install /usr/local/bin/jar jar
/usr/local/jvm/jdk1.7.0_09/bin/jar 1 - [Comment] If you have multiple version of JDK in the system, you could config them
- sp@simple-plan:~$ sudo update-alternatives --config javac
- sp@simple-plan:~$ sudo update-alternatives --config java
- sp@simple-plan:~$ sudo update-alternatives --config jar
Setting Java home path:
- [Comment] Configure Java home path
- sp@simple-plan:~$ vim ~/.bashrc
# Append the configures to the file
...
JAVA_HOME=/usr/local/jvm/jdk1.7.0_09/
export JAVA_HOME
JRE_HOME=/usr/local/jvm/jdk1.7.0_09/jre
export JRE_HOME
CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export CLASSPATH
PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export PATH
... - sp@simple-plan:~$ source ~/.bashrc
- [Comment] Add man path
- sp@simple-plan:~$ sudo vim /etc/manpath.config
...
19 #
20 MANDATORY_MANPATH /usr/man
21 MANDATORY_MANPATH /usr/share/man
22 MANDATORY_MANPATH /usr/local/share/man
23 MANDATORY_MANPATH /usr/local/jvm/jdk1.7.0_09/man
24 #---------------------------------------------------------
...
Checking version:
Uninstall Java SE 7 JDK:
[Eclipse 4.2.1 (Juno)]
Introduction:
Installation:
- [Comment] Java version test
- sp@simple-plan:~$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) Client VM (build 23.5-b02, mixed mode)
Uninstall Java SE 7 JDK:
- [Comment] Remove Java directory
- sp@simple-plan:~$ sudo rm -rf /usr/local/jvm/jdk1.7.0_09/
- [Comment] Remove links of Java
- sp@simple-plan:~$ sudo update-alternatives --remove javac /usr/local/jvm/jdk1.7.0_09/bin/javac
- sp@simple-plan:~$ sudo update-alternatives --remove java /usr/local/jvm/jdk1.7.0_09/bin/java
- sp@simple-plan:~$ sudo update-alternatives --remove jar /usr/local/jvm/jdk1.7.0_09/bin/jar
[Eclipse 4.2.1 (Juno)]
Introduction:
- Official website: http://www.eclipse.org/
- Download: http://www.eclipse.org/downloads/
- Document: http://help.eclipse.org/juno/index.jsp
Installation:
- Reference: http://akovid.blogspot.tw/2012/08/installing-eclipse-juno-42-in-ubuntu.html
- Reference: http://blog.brunobraga.net/eclipse-42-in-ubuntu-1204
- [Comment] Download the tarball and extract it.
- sp@simple-plan:~$ tar -zxvf eclipse-SDK-4.2.1-linux-gtk.tar.gz
- [Comment] Move eclipse to an appropriate directory
- sp@simple-plan:~$ sudo mv ./eclipse /opt/
- [Comment] Make a link
- sp@simple-plan:~$ sudo update-alternatives --install /usr/bin/eclipse eclipse /opt/eclipse/eclipse 1
- [Comment] Add eclipse to unity
- sp@simple-plan:~$ sudo vim /usr/share/applications/eclipse.desktop
# Add the following into the file
[Desktop Entry]
Version=4.2
Name=Eclipse
Comment=Java Integrated Development Environment
Exec=/opt/eclipse/eclipse
Type=Application
Icon=/opt/eclipse/icon.xpm
Terminal=false
NoDisplay=false
Categories=Java;Development;IDE
- [Comment] Remove eclipse directory
- sp@simple-plan:~$ sudo rm -rf /opt/eclipse
- [Comment] Remove links of eclipse
- sp@simple-plan:~$ sudo update-alternatives --remove eclipse /opt/eclipse/eclipse
- sp@simple-plan:~$ sudo rm -rf /usr/share/applications/eclipse.desktop
VW88
ReplyDeleteAgen Slot
Movie