Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 68754 invoked from network); 31 Dec 2009 23:03:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Dec 2009 23:03:33 -0000 Received: (qmail 13198 invoked by uid 500); 31 Dec 2009 23:03:33 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 13125 invoked by uid 500); 31 Dec 2009 23:03:33 -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 13117 invoked by uid 99); 31 Dec 2009 23:03:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 23:03:33 +0000 X-ASF-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [166.102.165.42] (HELO lrcmmta08-sus.windstream.net) (166.102.165.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 23:03:25 +0000 X-WS-COS: WSOB803 X-Cloudmark-Category: Undefined:Undefined X-Cloudmark-Analysis: v=1.1 cv=GnIzpMzBswjsq42lu3Powhbj68fhjjOcMrdfCK20wUM= c=1 sm=0 a=o28BOTXgPj0A:10 a=XUWUkpyvvxnTotYbeSgA:9 a=7RIKU5wPZdCh9Sxmt5QA:7 a=TTLA6tihDbH_TDcmLS9qGT5QsQIA:4 a=Y9QxGw3A/hfYq7ED+6FMbQ==:117 X-Cloudmark-Score: 0 Received: from [71.31.70.52] ([71.31.70.52:42318] helo=boromir.storta.net) by lrcmmta08 (envelope-from ) (ecelerity 2.2.2.43 r()) with ESMTP id 3B/5B-05899-8AD2D3B4; Thu, 31 Dec 2009 17:03:04 -0600 Received: by boromir.storta.net (Postfix, from userid 500) id D28681E000E; Thu, 31 Dec 2009 18:03:03 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on shelob.storta.net X-Spam-Level: Received: from [192.168.1.10] (aragorn.storta.net [192.168.1.10]) by boromir.storta.net (Postfix) with ESMTP id 23B031E000E for ; Thu, 31 Dec 2009 18:03:03 -0500 (EST) Subject: CLASSPATH scripts do not work as defined in Getting Started in Derby Guide From: "John Storta Jr." To: derby-user@db.apache.org Content-Type: text/plain; charset="UTF-8" Date: Thu, 31 Dec 2009 18:03:02 -0500 Message-ID: <1262300582.3083.33.camel@aragorn> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Old-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 I have just started working with Derby. I was going through the getting started guide and came across an issue. On pages 13 and 14 of the 'Getting Started in Derby Guide', there are 3 scripts referenced that can be used to set the CLASSPATH environment variable. setEmbeddedCP, setNetworkServerCP, & setNetworkClientCP. The documentation indicates that the appropriate script should be run depending on your needs. Running the scripts like any other script does not work. When a script is run, it launches a new shell for that script. The CLASSPATH is set within that shell. Once the script is complete, that shell exits and you are returned to your shell. The CLASSPATH is only changed for the shell that the script was running in. The CLASSPATH in your shell is unchanged. $ ${DERBY_HOME}/bin/setNetworkClientCP Will result in your CLASSPATH being unchanged. In order for CLASSPATH in your shell to be updated, you have to run the script from within your shell (not launch a new shell). This is done by 'sourcing' the script. $ . ${DERBY_HOME}/bin/setNetworkClientCP Will run the script within your shell resulting in your CLASSPATH being updated. The documentation is not clear on this. Updating the documentation to state that the scripts should be sourced rather than run will introduce another problem. The scripts contain error checks which will exit the shell if DERBY_HOME is not set. If you source the script, it is running in your shell, which means your shell will exit if the error is encountered. The documentation should be updated and the scripts would need to be updated to spit out the error, but not exit the shell. I looked through JIRA and I do not see this logged as a bug. If there is agreement that this is a bug, I can open one. As I am new to this, I wanted to bounce it off the list first. John S.