ubuntu1110下安装JDK和eclipse手记 2011-10-20
copy jdk-7u1-linux-x64.tar.gz to usr/java
sudo rm java
sudo ln -s -f /usr/java/jdk1.7.0_01/jre/bin/java
sudo ln -s -f /usr/java/jdk1.7.0_01/bin/javac
sudo gedit .bashrc
JAVA_HOME=/usr/java/jdk1.7.0_01
JAVA_BIN=/usr/java/jdk1.7.0_01/bin
PATH=$PATH:$JAVA_BIN
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
feuyeux@feuyeux-ubuntu:~$ java -version
java version "1.7.0_01"
Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
eclipse-SDK-3.7.1-linux-gtk-x86_64.tar.gz
----
fedora4下安装JDK和eclipse手记 2007-11-3
下载jdk-6u3-linux-i586.bin放在/opt下
sh jdk-6u3-linux-i586.bin开始安装,出现license.输入yes
/usr/java/jdk1.6.0_03 zidong fang
/opt/sun/javadb
配置 Java 编译、运行环境
创建快捷方式以取代 GCJ
#cd /usr/bin
#ln -s -f /usr/java/jdk1.6.0_03/jre/bin/java
#ln -s -f /usr/java/jdk1.6.0_03/bin/javac
gedit ~/.bashrc
加入如下五行:
JAVA_HOME=/usr/java/jdk1.6.0_03
JAVA_BIN=/usr/java/jdk1.6.0_03/bin
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
[root@dhcp-24515-411 ~]# java -version
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
version3.3
eclipse-java-europa-fall-linux-gtk.tar.gz
/opt/eclipse-java-europa-fall-linux-gtk.tar.gz
把eclipse解压到当前目录.
建立一个run.sh文件,
export JAVA_HOME=/usr/java/jdk1.6.0_03
export CLASSPATH=/usr/java/jdk1.6.0_03/lib
/opt/eclipse/eclipse -vm /usr/java/jdk1.6.0_03/bin/java &
给run.sh加上执行权限: chmod +x run.sh
这样就可以双击run.sh就运行eclipse了.
/root/workspace
apache-tomcat-5.5.23.tar.gz
unzip /opt/tomcat5.5
# vi startup.sh
添加
JAVA_HOME=/usr/java/jdk1.6.0_03
export JAVA_HOME
# vi shutdown.sh
添加
JAVA_HOME=/usr/java/jdk1.6.0_03
export JAVA_HOME