Please help me work with derby on netbeans

View: New views
1 Messages — Rating Filter:   Alert me  

Please help me work with derby on netbeans

by aceneerav :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have downloaded the complete install package of netbeans for mac os x. now, somehow the uninstaller is missing and so the only way i could get rid of the old version was to delete the directory. unfortunately netbeans remembers all the previous settings and so automatic configuration of derby didn't take place. now, i separately installed derby too on my mac.



now, i created a database and connected to it from the services tab and by default it uses the client driver. i wrote the following code (with the help of the java se tutorial) to connect my app to the database...




Code:
package javaapplication7;



import java.sql.*;



public class Main {



    public static void main(String[] args) {

        try

        {

            Class.forName("org.apache.derby.jdbc.ClientDriver");

            Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/sample");

        }

        catch(SQLException s)

        {

            System.out.println(s);

        }

        catch(ClassNotFoundException c)

        {

            System.out.println(c);

        }

    }



}







i get a ClassNotFoundException. Derby.jar is already added to the classpath in the Ant section in preferences. Please tell me what should i do?



PS: I have made posts on similar topics and sun forums and at apple developer discussions and they are yet unanswered.