Hi,
I'm trying to connect to a newly downloaded and installed Oracle 10g
Express database via MyEclipse. I need to define a connection URL. The
name of the database I want to connect
to is 'HR' (the sample that comes with the installation). The username
is 'SYSTEM' and the password is 'wgb1454'. I'm assuming the driver is a
'thin' driver (see the URL below). The driver's
package is oracle.jdbc.OracleDriver found in the ojdbc14.jar.
jdbc:oracle:thin@//localhost:1521:HR,SYSTEM,wgb1454
I'm also unable to connect via port 8080. The database is up and
running. Any help would be greatly appreciated!
Manish Pandit - 10 Nov 2006 18:53 GMT
Not sure why you are trying to connect via port 8080. Assuming you
installed oracle with defaults, the port will be 1521. Try this:
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@localhost:1521:hr", "system",
"wgb1454");
System.out.println("Connected ? " + (conn != null ));