X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=BAYES_00,FORGED_YAHOO_RCVD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <26753996.post@talk.nabble.com> Date: Fri, 11 Dec 2009 18:42:16 -0800 (PST) From: rgc3679 To: cygwin AT cygwin DOT com Subject: BASH Shell - Configuration Problem? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I haven't used cygwin or bash in 5 years, but I need to write a bash script for my ISP to test JavaMail. I can't get simple things to work, so I'm wondering if maybe I have a bash shell config issue. I did update cygwin to the latest. Here's a script I have written: --------------------------------------------- #!/bin/bash export JAVA_HOME="/usr/lib/jvm/jdk1.6.0_07" export TEST_HOME=. export PATH=.:${JAVA_HOME}/bin:${PATH} export TEST_JAR=${TEST_HOME}/test.jar export JAR1=${TEST_HOME}/log4j.jar export JAR2=${TEST_HOME}/commons-logging.jar export JAR3=${TEST_HOME}/commons-discovery.jar export JAR4=${TEST_HOME}/mail.jar export JAR5=${TEST_HOME}/activation.jar export CLASSPATH="$TEST_JAR;$JAR1;$JAR2;$JAR3;$JAR4;$JAR5" echo $CLASSPATH # ${JAVA_HOME}/bin/java -version $JAVA_HOME/bin/java -Xms128m -Xmx128m com.bob.test.JavaMailTest ---------------------- When I run this from my cygwin bash shell, here's what I get: bash-3.2$ ./test_javamail.sh /activation.jarery.jar /bin/java: No such file or directoryb/jvm/jdk1.6.0_07 /bin/java: No such file or directoryb/jvm/jdk1.6.0_07 Notice how the echo of the classpath is an overwrite of JAR3 path by JAR5 path. Also, a similar overwrite when I try to get the java version, and run my tester. Any ideas? I'm open to writing this in any other script, so please let me know if I should be using a sh script or something else. Thanks, --Bob -- View this message in context: http://old.nabble.com/BASH-Shell---Configuration-Problem--tp26753996p26753996.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple