Basic settings of the Java Development Environment

Source: Internet
Author: User
Tags oracle database installation
As a beginner of Java, I don't know if other beginners have the same feelings as me: it is too difficult to configure such a complex environment for Java development! During the first configuration, the Oracle listening service could not be opened, and PLSql could not connect to Oracle. After all these problems are solved, I heard that Tomcat should be configured and checked, configuration is required before Tomcat configuration.

As a beginner of Java, I don't know if other beginners have the same feelings as me: it is too difficult to configure such a complex environment for Java development! During the first configuration, the Oracle listening service could not be opened, and PLSql could not connect to Oracle. After all these problems are solved, I heard that Tomcat should be configured and checked, configuration is required before Tomcat configuration.

As a beginner of Java, I don't know if other beginners have the same feelings as me: it is too difficult to configure such a complex environment for Java development! During the first configuration, the Oracle listening service could not be opened, and PLSql could not connect to Oracle. After all these problems are solved, I heard that Tomcat should be configured and checked, JDK needs to be configured before Tomcat is configured, so it is as if you have caught a rope, and the grasshoppers on this rope will blow up the pot! Fortunately, the basic settings for the Java Development Environment have been basically completed. Therefore, I wrote this blog to explain my own ideas and give other beginners some small references!

The following sections describe the installation parts except JDK and Tomcat, which have no mandatory order.

Therefore, this is to give readers a clear understanding of configuring the Java Development Environment from scratch. In short, it may be easier to understand. In addition, the tool designed below will not introduce the installation method in detail (many online tutorials are also very clear). It is easy to understand: This blog post focuses on "what to do, as for "How to do it", I will provide some connections, and readers can also search on the Internet. There are many similar tutorials.

1. Install Oracle

First, let's overcome the old challenge-Oracle. Here, two installation packages are required:

1. Oracle 11g

(1) Installation

Download win32_11gr2_database_1of2.zipand win32_11gr2_database5of2.zip from oracle, and then

Decompress both of them to the current folder (follow the prompts to replace them). In this way, a "database" file will be generated in the current directory.

Click “setup.exe to start Oracle database installation.

(2) set the listener

Set the listener in "NetConfiguration Assistant"

(3) Create a database

Create a database instance in DatabaseConfiguration Assistant.

Http://jingyan.baidu.com/article/90bc8fc80c01f2f653640c1f.html (link: How Oracle creates a database)

(4) Considerations

A, No listening program

I reinstalled Oracle twice and even reinstalled the system for the second time. However, the problem of "no listening program" is repeated, not only when PlSQL is connected to the database, this occurs when you create a database. As a result, you cannot create a database instance. Since Oracle was installed again after the system was re-installed for the second time, the possibility of software problems was relatively small, so I did not solve the problem after I checked it online.

And then I found that my registry and service do not have the Oracle listening service! So I thought it was wrong to install the software. So I was ready to reinstall the software. However, this was the appearance of the weekly sound of the Savior, and after a while of research,FinalFound the problem: Permission !!I used to log on to the system as a standard user and did not have the permission to change some files in the Oracle directory. Therefore, I always prompted:Access denied. Log on to the super Administrator. The Listener is successfully started and the database instance is created!

VcGVy1f3U2r + release/dTatsHW96Osse2j/S3V/dTatsG52L2htMqj/release/adElPvLjSqA = "height =" 288 "src =" http://www.68idc.cn/help/uploads/allimg/150614/0G9303a9-1.jpg "width =" 480 "/>

BRemember password

If you do not select the red box, that is, the default "these accounts use different passwords": the Default usernames and passwords correspond ----Sys/change_on_install; SYSTEM/manager; normal/tiger. If you select "use the same password for all accounts", all the users mentioned above correspond to your own password.

Why do you need to pay attention here? Because I have planted a heel here. When I set it myself, I "use the same password for all accounts", but when I connect to Oracle using PlSQL, the username and password I entered correspond to the default ones respectively, so I always prompt me:

I checked a lot of information on the Internet to solve this problem. What environment variables, various services, and so on did not solve the problem. Then I suddenly thought of creating a database, I used "use the same password for all accounts", And I reset the password for all users! Therefore, I cannot log on with the default user name and password. So this problem is solved successfully!

2. OracleClient

The specific installation process is not described in detail. Follow the tutorial step by step. This is relatively simple and cannot cause any problems. However, after installing the Oracle client, it is very important to open the installation directory of the oracle client.Tnsnames. oraAdd the following configuration at the end of the file. The reference process is as follows:

Orcl = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = your ip address or computer name) (PORT = 1521 ))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl )))

In this way, you can read your database instance on the PLSQL logon interface, as shown in:

ActuallyInstallation-freeOracleClient, That is, the file. After the Oracle11g installation is complete, directly extract the file to the directory C: \ app \ sunliduan \ product \ instantclient_11_2 (select your own installation directory ). However, if you choose an installation-free clientConfigure the followingSelect instantclient_11_2 for the Oracle main directory in PLSQL..

Ii. Install PLSQL

The installation process is not detailed, and there is no difficulty. The configuration of PLSQL is worth noting. After PLSQL is installed, you do not need to log on. You need to configure the following content:

The first path in the red box is the path of the Oracle client we installed. The second path is automatically detected after we select the first path. You only need to select the path. It's easy to configure only these PLSQL statements.

Then you can try PLSQL to connect to Oracle,Pay attention to the user name and password (whether to reset ),Make sure that the listener service is enabled. If there are still problems, don't be afraid. Let's continue to solve them one by one!

3. Configure JDK

Java JDK installation package. JDK is the abbreviation of JavaDevelopment Kit, which contains the JRE used by users, that is, the Java RuntimeEnviroment runtime environment. So JDK is installed, and JRE is also installed.

The download and installation of JDK are very simple. You can proceed with the next step. However, we need to configure some environment variables. In the environment variables, we need to make two changes:

Add the JAVA_HOME system variable:Right-click "computer" and click "properties". Then, the corresponding environment variables can be added. Among them, the JAVA_HOME variable value is: C: \ ProgramFiles \ Java \ jdk1.8.0 _ 05 (that is, the directory path of your installed JDK ).

ModifyPathSystem variables:Add the Java value to the path and add the following statement at the end; % JAVA_HOME % \ bin (I .e. \ ProgramFiles \ Java \ jdk1.8.0 _ 05 \ bin ).

After the JDK is installed, the configuration is complete. We can check whether the JDK is successfully installed. Open the DOS window and enter the commandJava-VersionAnd press Enter. If the version information is displayed, the JDK configuration is successful!

Jov. 1 verslonaUaUersion "1. 8. Day 5, aua AuaHotSPot64-bit serueruh Production "array-refer to Bu phantom bu Wei .. j: slogan dninistrator>-mouth month. "height =" 174 "src =" http://www.68idc.cn/help/uploads/allimg/150614/0G9306129-9.jpg "width =" 576 "/>

4. Configure Tomcat

After JDK is configured, you need to install and configure Tomcat. Tomcat is one of the open-source and free java Web servers. It is the first choice for developing and debugging JSP and Servlet programs.

Tomcat has two types:One is the installation version, and the other is the installation version.The installation version is similar to JDK installation. Without the installation version, you can directly extract the compressed file to the desired directory. Compared with the installation and configuration of Oracle, these are relatively simple. However, you also need to pay attention to the setting of an environment variable. FirstAdd CATALINA_HOME system variableThe variable value is the directory just extracted, such as C: \ ProgramFiles \ apache-tomcat-7.0.54.

Check that Tomcat appears in the lower right corner of the computer, and run in green and stop in red.

Open http: // localhost: 8080. If a page appears, Tomcat is successfully installed.

5. Install MyEclipse

1.Install MyEclipse

The installation of MyEclipse is very simple and there will be no problems. I will not go into details here. You can configure your own Tomcat and JDK in MyEclipse.

2.Configure Tomcat

In the MyEclipse toolbar, choose Window>-preferences>-MyEclipse>-Servers>-Tomcat 7.x. the configuration is as follows:

3.Configure JDK

After configuring Tomcat, you must continue to select JDK under the preceding path, that is, Window>-preferences>-MyEclipse.

>-Servers>-Tomcat 7.x>-JDK

AddJDK Yiwei .... Select JREhome: C: \ programFIIe, \ JavaVdkl.8. 05 Directory... JREname: DefaultVMArguments: JREsystemIibraries: jdkl.8.0 -- 05 A l two... Eye LL -- a bite of rock v 'shi 'B, ""' "on the side of the day cited by day, day, day C: \ programC: \ programC: \ programFIIe, \ JavaVdkl.8. adjacent Mre \ lib \ re, ource. FileS \ JavaMdkl.8. still Mre \ lib \ rt. jarFIIe, \ JavaVdkl.8. still Mre \ libV, e. jarFIleS \ JavaVdkl.8. a few still Vre \ lib ce. jarFIIe, \ JavaVdkl.8. still Mre \ lib \ c Bu ar, et,: File, Mark avaVdkl · 8. 0 A SVre \ libMfrjarFiles \ JavaMdkl.8. a few still Vre \ Iib \ eXt \ acce: FIIe, \ Java ya dkl.8. a few still ah r release lib \ eXt \ cldrdFIIe, \ Java dkl.8. several neighboring Vre \ lib \ ext \ dnsnFileS \ JavaMdkl.8 · o SMre \ lib \ extVaccev AddEXternalJARs... JavadocLocationSourceAttachment... RemOVeUp gas. , Jingjing "Shan Jing Xin Han Bian Re" toreDefault

Simple, so MyEclipse is configured.

So far, the configuration of the Java development environment has been basically completed. In the installation and configuration over the past few days, I have read numerous documents, from the chaotic state of the Java environment, now I have a clear understanding, but it is still a bit confusing. Let's talk about the experiences of these things over the past few days. The problem is actually one by one, and then we start to query information online. After solving the problem, we come to another one! In addition, there are many materials on the Internet, and the problems are similar to mine. However, according to others' methods, their own problems cannot be solved (but some can still be solved ).

At this time,Deeply aware of the importance of search and the uniqueness of personality.The methods on the network are just common issues. They must be implemented on their own and combined with their own environments. In this way, the problem can be solved. Here, I think of what the teacher often says:It is better to read a thousand books than to walk a thousand miles, but there are not as many people as you can read a thousand books. It is better to give directions to famous teachers than to give directions to yourself!Well, let's not talk about it. Continue to study Java in the future! I also hope this article will be helpful to you!

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.