Detailed explanation of how to build a Java development environment under Ubuntu

Source: Internet
Author: User
Tags svn svn client tomcat version control system

Installation steps and problems:

This article takes the current user account installation and configuration as an example. It is not as troublesome as switching to the root account, and occasionally has permission issues.

1. Install jdk 1.6

I installed a jdk-6u45-linux-x64.bin, installing rpm on Ubuntu is very troublesome, the. Binfile is directly installed on OK. Jdk 1.6 is still very good. The key is to be consistent with the "working environment. To be stable or not up-to-date, the new version may not be good. Attached: jdk official download address.

After the download, open the terminal (ctrl + alt + t), enter the downloaded file directory, and then run the command to install to the specified directory. For example, my jdk installation directory is: /home/henry/jvm/. The download directory is/home/henry/download/. The command is:

The code is as follows: Copy code

$ Cd/home/henry/download
$ Sudo./jdk-6u45-linux-x64.bin

After installation [. bashrc] add the environment variable to the configuration file and execute the command $ gedit/home/henry /. bashrc can be opened in a text editor, and then added at the end:

The code is as follows: Copy code

# Set java environment
Export JAVA_HOME =/home/henry/jvm/jdk1.6.0 _ 45
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH = $ JAVA_HOME/lib:.: $ JAVA_HOME/jre/lib: $ CLASSPATH

Finally, enter the command $ java with the correct command information or $ java-version to view the version information. If the result is not correctly output in some cases, you can use the ln command to link the java command to the bin/java command in the jdk installation directory. The link command is as follows:

The code is as follows: Copy code

$ Ln-t/home/henry/jvm/jdk1.6.0 _ 45/bin/java

2. Install tomcat 6

Download the tomcat package and decompress it to the current user's directory. Attached: tomcat6 official download address. Add the environment variable to the [. bashrc] configuration file under/home/henry:

The code is as follows: Copy code

Export TOMCAT_HOME =/home/henry/apache-tomcat-6.0.32

Go to the/home/henry/apache-tomcat-6.0.32/bin directory and run $ sh. /shartup. sh start tomcat and browse http: // localhost: 8080 in the browser. The tomcat interface is normal.

3. Install Spring Tool Suite (STS) development Tool

STS development tools are used in the same way as eclipse, but maven integration is good and easy to use. Attached: Official Download address of Spring Tool Suite.

It is recommended to download the sh file, and then the terminal enters the download directory, execute the $ sh spring-tool-suite-3.2.0.RELEASE-e3.8.2-linux-gtk-x86_64-installer.sh to follow the steps to install. I initially mistakenly thought that I had installed a 64-bit system. As a result, Spring Tool Suite cannot be started after installation.

4. Install the SVN client and plug-in

Apache Subversion (SVN for short) is an open-source version control system. It uses a branch management system relative to the cross-node scripting (RCS) and CVS. Its design goal is to replace CVS, more and more control services on the Internet are transferred from CVS to Subversion.

On Ubuntu, you can use apt-get to easily install the svn client and run the command $ sudo apt-get install subversion on the terminal to install the client. Then, you need to run the command checkout, add, commit, and other operations, it is far worse than TortoiseSVN on Windows, but you can use commands to learn more about how svn works.

On STS, you can Install the subclipse plug-in online, open the Help Install New Software dialog box, enter the online update address in work with, such as the http://subclipse.tigris.org/update_1.8.x, press enter to display the package content, then select all the installation options. You can also manually download the installation package. In the Install New Software dialog box, click add next to work with, find the downloaded package, Install it, and attach the svn download address: official Download address of the eclipse plug-in subclipse.

Go to STS and open Preferences Term SVN. We recommend that you remove [delete resources not added to version control when replacing]. Otherwise, files not added to version control will be deleted during update, I was hurt once.

5. STS problems

After the subclipse plug-in is installed, an error occurs:

The code is as follows: Copy code

Failed to load JavaHL Library.
These are the errors that were encountered:
No libsvnjavahl-1 in java. library. path
No svnjavahl-1 in java. library. path
No svnjavahl in java. library. path

However, this problem is obvious, as long as you install the JavaHL library, you can try the online method is still useless. In fact, if you select all the plug-ins during installation (SVNKit is checked), you can change the Client of the SVN interface in Preferences "Term" SVN to SVNKit. If this is not checked during installation, use Help About Spring Tool Suite Installation Details to delete the plug-in and reinstall it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.