Hi,
I have an problem with connecting Oracle 10g express edition with java.
I am accessing my Oracle 10g with the following URL:
localhost:8080/apex
I am using the following code:
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:8080:xe","hr","hr");
System.out.println("Connected Successfully To Oracle");
con.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
Is the code I wrote correct????
If not please suggest me the correct code.
Thanks in advance.....