Results 1 to 2 of 2
  1. #1
    java_beginner is offline Member
    Join Date
    May 2010
    Posts
    1
    Rep Power
    0

    Default Help setting up JavaDB

    Hi

    I'm trying to set up and use JavaDB with Netbeans. I set up a JavaDBEmbedded library in Netbeans and the small piece of code I have wont run. The current error is
    java.sql.SQLException: Database 'TestDB' not found.

    I didn't think JavaDB needed much setting up but I've since gone back and read about setting the CLASSPATH and DERBY_HOME variable. What I've read all say to set it temporarily and do it at the command line. I'm not sure how to go about this since I'm using Netbeans. Can anyone offer any advice how to get it up and working??

    The code I'm using is..

    Java Code:
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
                Connection con = DriverManager.getConnection("jdbc:derby:TestDB","user", "password");
    Thanks :)

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,434
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by java_beginner View Post
    Hi

    I'm trying to set up and use JavaDB with Netbeans. I set up a JavaDBEmbedded library in Netbeans and the small piece of code I have wont run. The current error is
    java.sql.SQLException: Database 'TestDB' not found.

    I didn't think JavaDB needed much setting up but I've since gone back and read about setting the CLASSPATH and DERBY_HOME variable. What I've read all say to set it temporarily and do it at the command line. I'm not sure how to go about this since I'm using Netbeans. Can anyone offer any advice how to get it up and working??

    The code I'm using is..

    Java Code:
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
                Connection con = DriverManager.getConnection("jdbc:derby:TestDB","user", "password");
    Thanks :)
    If you don't have that testDB yet append the string ";create=true" to your url.

    kind regards,

    Jos

Similar Threads

  1. client javadb connection over internet
    By OmerHalit in forum JDBC
    Replies: 15
    Last Post: 05-26-2010, 11:27 AM
  2. Replies: 3
    Last Post: 10-08-2009, 10:27 PM
  3. load driver in javaDB
    By kulangotski in forum New To Java
    Replies: 1
    Last Post: 02-20-2009, 07:15 PM
  4. JavaDB Help
    By Sysem in forum New To Java
    Replies: 5
    Last Post: 05-29-2008, 09:21 PM
  5. JavaDB Installation
    By PhilArmstrong in forum New To Java
    Replies: 6
    Last Post: 05-13-2008, 02:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •