how to setup JDBC in Eclipse?

前端 未结 4 886
渐次进展
渐次进展 2020-12-30 09:22

I have eclipse and j developer,I am more comfortable with eclipse.I want to know how to setup the JDBC driver in eclipse,I downloaded a driver from oracle.com but it does no

4条回答
  •  孤城傲影
    2020-12-30 09:55

    You asked how to "set up jdbc in eclipse". Here is my take on your question. If this isn't the answer to your question maybe it will help someone else.

    Also - I'm using kepler eclipse. (really jboss dev studio version based on kepler)

    First set up the driver.

    Preferences -> Connectivity -> Driver Definitions

    Click Add... and follow the prompts. You will be able to test the connection at this point. Eclipse makes it obvious how! (Click the Test connection button)

    Close the Preferences window. In the main window

    Window -> Show View... -> Data Source Explorer

    Right click on Database Connections. Select New... and follow the prompts.

    You'll be able to open the connection and browse your database.

    As far as JPA-enabling your application, there may be a way to have eclipse set that up (ie right click on your project and maybe there is something in the context menu). It would set up a persistence.xml file in the right place and maybe other things. I don't know off the top of my head.

    Hope this helps.

提交回复
热议问题