db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Kartha <kar...@Source-Zone.Org>
Subject Re: derby jdbc load driver
Date Mon, 08 Aug 2005 16:09:58 GMT
Hello,

Since you are using the Embedded Driver, can you please check the 
CLASSPATH (i.e  Java Build Path -> Libraries under the
project Properties), if it has the 'derby.jar'.

I just tried it under Eclipse and it works for me.

public static void main(String[] args) {
        try{
            
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
            System.out.println("Driver Loaded");
        }catch(Exception e){
            System.out.println("Error "+e);
        }

    }
Output:
Driver Loaded

Regards,
Rajesh

Bogdan Mihaila wrote:

> Hello!
>  
> I'm trying to load the embedded derby driver, like this:
>  
> Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
>  
> It throws an exception, saying it cannot load the driver.
> I've put the derby jars in classpath (I work in Eclipse)
>  
> What is wrong? Please help me
> Bogdan




Mime
View raw message