jdbc derby driver

i installed the java application server and i want to connect to the derby database.

the only problem is that i can't .i used the instructions from the derby site to set up the database.

http://db.apache.org/derby/papers/DerbyTut/install_software.html

i have to enter each time those commands, because if i restart my computer and i come back and i try to usejava org.apache.derby.tools.sysinfoi get class not found error.

anyway after i set up that, and the network server it still doesn't work.

i get the following error:

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

I also tried usingorg.apache.derby.jdbc.ClientDriver (found this somewhere in the apache documentation) but still no success.

i tried with and without the Class.forName() method, i have jdk 1.6 installed so theoretically i shouldn't use that. then i get "couldn't find jdbc driver"

also i am using netbeans and i wanted to connect to the database with nebeans but i get an error. database not found if i put jdbc:derby:databasename

and couldn't find driver if i put jdbd:derby

i wanted then to use ms sql server but i got even in more trouble as i have sp2, and no matter what i do i still get "couldn't create socket" (or something like that.

[1343 byte] By [me1357a] at [2007-11-26 16:28:48]
# 1

The classpath you show is the NetBeans classpath or the system classpath.

To test derby try:

java -cp C:\Sun\SDK\bin;C:\Sun\SDK\javadb\lib\derbytools.jar;C:\Sun\SDK\javadb\lib\derby.jar; org.apache.derby.tools.sysinfo

Perhaps your system classpath is not propertly setted. If you are running windows test echo $CLASSPATH

form the command prompt.

topfoxya at 2007-7-8 22:53:09 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2

the class path i listed is the system classpath or at least that's what it should be.

if i try echo classpath in the command line i don't get anything. i don't understand why, i did the settings for this for about 1000 times, it all works fine after i finish (classpath and de the derby.tool comand) but still my program doesn't work even imediately afer i redone the settings.

and then, if i close the window and try to use the same commands i used before it's like i never done the settings.

i tried today one more time to connect with netbeans, i didn't change anything, and now i can acces the database. it shows the jdbc drivers

for derby just fine at databases in derby. but as i said in an actual program i still get couldn't find a driver or class not found.

someone told me to add jdbc to netbeans, i don't know exactly how to do that but i already have the jdbc drivers for derby (or at least that's what it shows)

me1357a at 2007-7-8 22:53:09 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

Did you test the command I send you?

Anyway i think you haven't system classpath set because you won' t see anything with the echo command and you must set classpath manually to run your application.

To fix system classpath go to the advanced tab of "System" menu in the control panel and click on "Environment". Look if there is a variable name CLASSPATH. If there isn't (as I think) create it.

topfoxya at 2007-7-8 22:53:09 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
i set the system classpaht, the user claspath all the posible paths actually lol but it doesn't work. don't know why, anyway i gave up using databases for this project.thanks for the help anyway
me1357a at 2007-7-8 22:53:09 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...