Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install JDK, configure Eclipse and Tomcat under Ubuntu 10.10

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to install JDK and configure Eclipse and Tomcat under Ubuntu 10.10. I hope you will get something after reading this article. Let's discuss it together.

1. Install JDK

1.1. Download the relevant JDK from the official website.

Jdk-6u23-linux-i586.bin is downloaded here.

Download address: http://www.oracle.com/technetwork/java/javase/downloads/index.html

1.2. create a "Java folder" in the "administrator personal folder"

Location-> Home folder-> administrator

Place the downloaded jdk-6u23-linux-i586.bin in the folder of this Java.

The path can be modified according to your actual situation. Here, take the Java folder under administrator as an example.

1.3. Open the "terminal"

That is, application-> attachment-> terminal

Enter:

Sudo sh jdk-6u23-linux-i586.bin

(you may encounter the user password you want to enter)

2. Set the JAVA_HOME environment system variable

2.1. here Ctrl+H can see hidden files and more useful keyboard shortcuts.

Enter:

Sudo gedit / etc/environment

Add to the file:

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

As shown in the figure:

Set the JAVA_HOME environment system variable

2.2. Again, modify the second file

Enter:

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 PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin

As shown in the figure:

2.3.Log out the user and test the JDK version.

Enter:

Java-version

As shown in the figure:

JRE and JDK installed successfully

3. Install Eclipse.

Download the relevant Eclipse from the official website

What is downloaded here is eclipse-jee-helios-SR1-linux-gtk.tar.gz (i.e. Java EE).

Download address: http://www.eclipse.org/downloads/

Put the downloaded eclipse-jee-helios-SR1-linux-gtk.tar.gz in the Java folder and decompress it.

Run the decompressed Eclipse, as shown below:

Run the decompressed Eclipse

4. Install Tomcat7.05

Download the relevant Tomcat from the official website

Apache-tomcat-7.0.5.tar.gz is downloaded here.

Download address: http://tomcat.apache.org/

Put the downloaded apache-tomcat-7.0.5.tar.gz in the Java folder, extract it and name it tomcat7

Commands that can be executed if you like to execute the command line

(decompress) sudo tar zxvf apache-tomcat-7.0.5

(named tomcat7) sudo mv apache-tomcat-7.05 tomcat7

4.3.Performing the bin file under tomcat7 at the terminal

(i.e. cd Java/tomcat7/bin)

Here you use the vim editor to open it, or you can open it 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

Add 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"

The port of tomcat7.0.5 (the default port of general tomcat7.0.5 is 8080). If there is a conflict, you can modify it in the following file.

In the tomcat7/conf/server.xml file:

Change it to 9090, or anything else (use 9090 here).

4.5.This has been entered into the Java/tomcat7/bin folder.

Enter:

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.

As shown in the figure:

To run http://localhost:9090/:

4.6.To turn off tomcat7

Enter:

Sudo. / shutdown.sh after reading this article, I believe you have a certain understanding of "how to install JDK and configure Eclipse and Tomcat under Ubuntu 10.10". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report