At development time, if you can open the database in Eclipse and look at the contents of the database with a more intuitive view, the development will be smoother and more efficient.
In the following example, for Oracle, the method of opening an Oracle database with Eclipse is shown in the most intuitive form.
- 1
Make sure that Oracle works correctly.
- 2
Open eclipse, find "window"--"Show View"--"other ..."
- 3
In the new window that pops up, open the folder "Data Management" to find "data Source Explorer" and click "OK".
At this point, there will be a "Data Source Explorer" tab bar below the Eclipse main interface, where you can right-click on the Database Connections folder icon and select "New ...".
A new window appears, find the database you are using "Oracle", a name for yourself, the small part of the "Cityinfo" this name. Then click "Next>"
As shown in the following:
When the following window appears, click the symbol (location) shown in the upper-right image to note this step.
Immediately before the step, in the New dialog box, find the Oracle version you are using, it is recommended to use the Oracle Thin Driver, flexible and convenient.
Find the jar List, if you are using ORACLE11, please remove the ojdbc14, otherwise, eclipse will not stop prompt error.
After you remove OJDBC14 from the previous step, import the Oracle driver package you are currently using, with ORACLE11, so you need to import OJDBC6, which is in the Oracle installation file. For the specific location you can refer to the small part of another relevant experience in detail.
Go to the Properties tab and enter the relevant content of your database, and the user name in Oracle is "Cityinfo". The individual information may be different in this step, please decide for yourself. Then click "OK".
When you click "OK" in the previous step, the previous window will be returned, and Eclipse will prompt for the "User name" username, which is the name of the database you created, not any name. After entering, you can click "Test Connection" below, when prompted "Ping successed!" Indicates that Eclipse and Oracle connections are successful. Then click Finish to complete the configuration.
At this point, the job is to display the tables in the database that you built in eclipse with a view.
Go back to the Eclipse main screen, find the location as shown, in "Tables", any table right-click, select "Data"--"Sample Contents"
A new tab bar appears in SQL Results, which shows the information of the tables stored in the database, and the small series does not insert any data in the table.
At this point, the connection between Eclipse and Oracle, and the contents of the tables in the display database, are complete. Then you can do the work behind the development.
END