Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED40811ED for ; Tue, 19 Apr 2011 20:50:36 +0000 (UTC) Received: (qmail 52114 invoked by uid 500); 19 Apr 2011 20:50:36 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 52090 invoked by uid 500); 19 Apr 2011 20:50:36 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 52083 invoked by uid 99); 19 Apr 2011 20:50:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 20:50:36 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcaddu-derby-user@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 20:50:29 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QCHs4-0007n1-SV for derby-user@db.apache.org; Tue, 19 Apr 2011 22:50:04 +0200 Received: from adsl-71-129-35-66.dsl.irvnca.pacbell.net ([71.129.35.66]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Apr 2011 22:50:04 +0200 Received: from mdeggers by adsl-71-129-35-66.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Apr 2011 22:50:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: derby-user@db.apache.org From: Mark Eggers Subject: Re: problem with embedded driver Date: Tue, 19 Apr 2011 20:46:05 +0000 (UTC) Lines: 40 Message-ID: References: <622761.48680.qm@web161304.mail.bf1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: adsl-71-129-35-66.dsl.irvnca.pacbell.net User-Agent: Pan/0.133 (House of Butterflies) On Tue, 19 Apr 2011 12:45:54 -0700, steve lescure wrote: > String dbName = "//localhost:1527/users"; This is a connection to the network server. If you don't start the database prior to running your program, there will be no connection. If you're using the embedded driver, the database name is just the name of the database (users, in your case). Now the next problem is that with NetBeans, the database gets created in a strange spot - $HOME/.netbeans-derby by default. Probably the easiest way to run this program is by passing a value for the derby.system.home property. This tells Derby where to look for databases when the program is started. By default, the value is ".". This obviously won't work for your code, since you used NetBeans to create the database. However, setting this in NetBeans is pretty easy. 1. Right-mouse click on your project and select Properties 2. In the dialog box, click on the Run item 3. Add the following to your VM Options: -Dderby.system.home=$HOME/.netbeans-derby You might have to replace $HOME with the full path, depending on how NetBeans handles environment variables. Now the program will run from within NetBeans. When you run this from the command line (in the dist folder of your project), use the following syntax. java -Dderby.system.home=$HOME/.netbeans-derby -jar YourApp.jar Hope this helps. . . . . just my two cents. /mde/