File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Getting started with Oracle 11g Express using Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Getting started with Oracle 11g Express using Eclipse" Watch "Getting started with Oracle 11g Express using Eclipse" New topic

Getting started with Oracle 11g Express using Eclipse

Christopher Sharp
Ranch Hand

Joined: Dec 12, 2007
Posts: 155

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

Joined: Mar 01, 2009
Posts: 2293

Try checking the Oracle "2 day Java developer" tutorial:

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:

That way you can look at your DB stuff even if your Java is in a mess.

No more Blub for me, thank you, Vicar.
I agree. Here's the link:
subject: Getting started with Oracle 11g Express using Eclipse
It's not a secret anymore!