How does Eclipse connect and open databases like Oracle?

Source: Internet
Author: User

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.

Tools/Materials
    • Operating system: Windows 7 64-bit

    • Database: Oraclexe112_win32 Express (the official website is only Win32, but the same applies on the Win64 bit)

    • Development tools: eclipse-jee-juno-sr2-win32-x86_64

Method:
  1. 1

    Make sure that Oracle works correctly.

  2. 2

    Open eclipse, find "window"--"Show View"--"other ..."

  3. 3

    In the new window that pops up, open the folder "Data Management" to find "data Source Explorer" and click "OK".

  4. 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 ...".

  5. 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:

  6. When the following window appears, click the symbol (location) shown in the upper-right image to note this step.

  7. 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.

  8. Find the jar List, if you are using ORACLE11, please remove the ojdbc14, otherwise, eclipse will not stop prompt error.

  9. 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.

  10. 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".

  11. 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.

  12. 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"

  13. 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
Tips:
    1. To completely remove the database information you have configured in eclipse above, locate D:\projects\java_project\.metadata\.plugins in your Java project folder and select Org.eclipse.datatools.connectivity "," Org.eclipse.datatools.connectivity.ui "," Org.eclipse.datatools.sqltools.result "These three folders, and delete them, then restart Eclipse, at this time, the original database configuration information will not exist, you can reconfigure.

How does Eclipse connect and open databases like Oracle?

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.