Dear Daniweb Members,
First of all sorry my english writing.
I installed JavaJDK 7u13 with NetBeans 7.2.1 and on a fresh OS. Then i set the environment variables according to their relative paths as seen below. By using ij the test database and the test table created, records inserted and displayed by using select. In command line and also in NetBeans IDE the HelloWorld console app run successfully. So far everything was fine. But when i try to make a connection inside NetBeans by using the code below i got the following exception.
Any help will be greatly appreciated. Urgent.

**    **Exception in thread "main" java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver**
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(
        at seconexample.SeconeXample.main(
    Java Result: 1
    BUILD SUCCESSFUL (total time: 0 seconds)**

****    Environment Variable Settings :  (ij, java and javac commands are working correctly)
    **JAVA_HOME =** C:Program FilesJavajdk1.7.0_13 
    **DERBY_HOME **= C:Apachedb-derby-;
    **CLASSPATH** = %DERBY_INSTALL%libderby.jar;%DERBY_INSTALL%libderbytools.jar;
    **Path**= %SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;C:Program FilesJavajdk1.7.0_13bin
    **DERBY_INSTALL** = C:Apachedb-derby-;****

Recommended Answers

All 2 Replies

by using the code below i got the following exception.

What code?
Double check and see if netbeans has updated the bin folder with the src folder, it might just be an issue of netbeans not copying the libraies correctly.

Also, did you add the .jar libraries into the java build path?

either that, or add the required jars to your projects path.
org.apache.derby.jdbc.EmbeddedDriver is not a part of the jre, so you'll need to have access to these classes in order to use them

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.