How does Eclipse connect and open databases like Oracle?

Source: Internet
Author: User
Tags win32

---------IDEA_WJ Reprint Please specify the author's pseudonym, Thank you January 26, 2014

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.

steps to read

Baidu Experience: jingyan.baidu.com

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

Baidu Experience: jingyan.baidu.com

Method:
  1. 1

    Make sure that Oracle works correctly.

    steps to read
  2. 2

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

    steps to read
  3. 3

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

    steps to read
  4. 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 ...".

    steps to read
  5. 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:

    steps to read
  6. 6

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

    steps to read
  7. 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.

    steps to read
  8. 8

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

    steps to read
  9. 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.

    steps to read steps to read
  10. 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".

    steps to read
  11. 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.

    steps to read steps to read
  12. 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"

    steps to read
  13. 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.

    steps to read END

Baidu Experience: jingyan.baidu.com

Tips:
    1. 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.

      steps to read END

Baidu Experience: jingyan.baidu.com

Precautions
    • Small part of the temporary thought of the process or notes have been described as far as possible, but there are some omissions, or insufficient, please understand.

    • Development tools A lot of detail, some may not talk about, we have any questions, please leave a message below. If the article is helpful, I hope you can click the thumb below or vote for the author, the author will appreciate

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.