| www.delorie.com/archives/browse.cgi | search |
| 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 <rgc3679 AT yahoo DOT com> |
| To: | cygwin AT cygwin DOT com |
| Subject: | BASH Shell - Configuration Problem? |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |