1. Installing the JDK
1.1. Download the relevant JDK to the website
The download here is Jdk-6u23-linux-i586.bin.
:http://www.oracle.com/technetwork/java/javase/downloads/index.html
1.2. Create a "Java folder" in "Administrator Personal Folders"
Location---Home folder->administrator;
Place the downloaded Jdk-6u23-linux-i586.bin in this Java folder.
The path can be changed according to your actual situation, here the Java folder under administrator as an example
1.3. Open "Terminal"
Applications, accessories, terminals
input :
- sudo sh jdk-6u23-linux-i586.bin
(You may encounter a user password to enter)
2. Set Java_home Environment System variables
2.1, here ctrl+h can see hidden files, more useful shortcut keys.
Input:
- sudo gedit/etc/environment
In the file, add:
- Export java_home=/home/administrator/java/jdk1.6.0_23
- Export jre_home=/HOME/ADMINISTRATOR/JAVA/JDK1.6.0_23/JRE
- Export CLASSPATH= $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib
That
Setting Java_home Environment System variables
2.2. Similarly, modify the second file
Input:
- sudo gedit/etc/profile
Add the following statement before Umask 022:
- export java_home =/home/administrator/java/ jdk1.6.0_23
- export JRE _home =/home/administrator/java/jdk1.6.0_23/jre
- export classpath = $CLASSPATH: $JAVA _home/lib: $JAVA _ home/jre/lib
- export = $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $HOME/bin
That
2.3, log off the user, detect JDK version.
Input:
- Java-version
That
Install JRE, JDK successful
3. Install Eclipse.
3.1, to the official website download the relevant eclipse
The download here is eclipse-jee-helios-sr1-linux-gtk.tar.gz (ie Java EE).
:http://www.eclipse.org/downloads/
3.2. Put the downloaded eclipse-jee-helios-sr1-linux-gtk.tar.gz in the Java folder and unzip it.
Run the decompressed eclipse, which is
Run the decompressed eclipse
4, Installation Tomcat7.05
4.1, to the official website download the relevant Tomcat
The download here is apache-tomcat-7.0.5.tar.gz.
:http://tomcat.apache.org/
4.2. Place the downloaded apache-tomcat-7.0.5.tar.gz in the Java folder, unzip it and name it TOMCAT7
Commands that you can execute if you prefer to execute the command line
(unzip) sudo tar zxvf apache-tomcat-7.0.5
(named TOMCAT7) sudo mv apache-tomcat-7.05 TOMCAT7
4.3, the bin file under the terminal TOMCAT7
(i.e. CD Java/tomcat7/bin)
Here is the VIM editor open, you can also open with gedit, that is, enter:
- sudo gedit catalina.sh
When you enter:
- sudo vim catalina.sh
Get
- Cygwin=false
- os400=false
- Darwin=false
- Case "' uname '" in
- cygwin*) CYGWIN=true;;
- os400*) os400=true;;
- darwin*) Darwin=true;;
Added above:
- java_home=/home/administrator/java/jdk1.6.0_23
- java_opts="-server-xms512m-xmx1024m-xx:permsize=600m-xx:maxpermsize=600m- Dcom.sun.management.jmxremote "
4.4, tomcat7.0.5 Port (general tomcat7.0.5 Port default is 8080), if there is a conflict, you can modify the following files.
tomcat7/conf/server.xml" in the file:
- < connector port = "9090" protocol = "http/1.1"
- connectiontimeout = "20000"
- redirectport = "8443" />
Change it to 9090, or whatever it is (use 9090 here).
4.5, here has entered the Java/tomcat7/bin folder inside.
Input:
- sudo./starup.sh
Start Tomcat 7.
If it appears
- Using catalina_base: /home/administrator/java/tomcat7
- using catalina_home: /home/administrator/java/tomcat7
- using catalina_tmpdir: /home/ administrator/java/tomcat7/temp
- Using JRE_HOME : /home/administrator/java/jdk1.6.0_23
- using classpath: /home/administrator/ java/tomcat7/bin/bootstrap.jar:/home/administrator/java/tomcat7/bin/tomcat-juli.jar
is successful.
That
Copyright NOTICE: This article for Bo Master http://www.zuiniusn.com original article, without Bo Master permission not reproduced.
Installing the JDK under Ubuntu 10.10 Configuring Eclipse and Tomcat