• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting started with Oracle 11g Express using Eclipse

 
Christopher Sharp
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am new to using JDBC, and wish to test out the connection to an oracle database with Java using Eclipse. Once I can get past this hurdle, I am hoping to move forward more quickly and get Oracle incorporated in an Eclipse projects using JavaServer Faces.

I have Eclipse Indigo Release 2 and Java 1.7 installed on my Windows Vista computer, and have been using JavaServer Faces 2.0 for several months, but now wish to access an Oracle database. A while ago I also installed Oracle Database 11g Express, but it has been sitting dormant until now. In the command DriverManager.getConnection(url) a string is required for url, and I am not clear what information I should provide. The argument of getConnection provided by Oracle is: "jdbc:myDriver:myDatabase", username, password. What should "myDriver" be, and presumably "username" and "password" apply to "myDatabase"?

I am sure this is very elementary, but would most appreciate some help in getting started. Many thanks in advance, and perhaps someone can kindly give some advice on setting up Eclipse to handle database connections.
 
chris webster
Bartender
Posts: 2407
33
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try checking the Oracle "2 day Java developer" tutorial: http://docs.oracle.com/cd/E17781_01/appdev.112/e18805/getconn.htm

It's aimed more at people using JDeveloper instead of Eclipse, but the JDBC connection details work teh same way.

You may also find it useful to download the free SQLDeveloper tool to use for building/exploring your database schema: http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html

That way you can look at your DB stuff even if your Java is in a mess.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic