Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Connecting to DB crashes Java
Dare Obasanjo wrote:
> Everytime I try to connect to my database using jdbc Java crashes on me.
>
> I use jdk1.2.2 on an Oracle 8.1.5 database on Windows 98SE. Here's my
> problem
>
> /*
> DB access method 1
> ---------------------
> ry{
> Class.forName("oracle.jdbc.driver.OracleDriver");
> }catch(ClassNotFoundException e){
> System.out.println("Could not load Oracle Driver");
> }
>
> String user, pass;
> user = readEntry("userid: ");
> pass = readEntry("password: ");
> Connection conn =
> DriverManager.getConnection("jdbc:oracle:oci8:"+user+"/"+pass+"@orcl.25hoursaday.com");
>
> or
> DriverManager.getConnection ("jdbc:oracle:oci8:@", "scott", "tiger");
>
> or
> DriverManager.getConnection("jdbc:oracle:oci8:"+user+"/"+pass+"@");
>
Try to use thin drivers. I use them with jdk 1.2.2 and they work with oracle 8.1.5 and 7.3.2 as well. (tested on WindowsNT and Solaris 2.6)
Martin
--
![]() |
![]() |