Cygwin and JVMs

Mon Jan 29 18:07:00 GMT 2001

At 03:18 PM 1/29/2001 -0500, Larry Hall (RFK Partners, Inc) wrote:
>At 02:54 PM 1/29/2001, Galen Boyer wrote:
> >How does one deal with the classpath's and other environmental
> >variables when porting scripts between windows and unix, using
> >the cygwin tools of course.
> >
> >For context, we are using weblogic, ejb, java, toplink and verve.
> >We right now have *.cmd files to compile and start the
> >application.  Is there a way to *.sh files executing in the
> >cygwin environment that can then be ported to the UNIX machine?
> >We keep having to deal with the classpath separators and
> >drive-letters right now and can't get one script for both
> >platforms.
>If you don't have source available to these components so that they can
>be built under Cygwin (thereby eliminating the need to use DOS style paths),
>you might find Cygwin's cygpath utility helpful.

Try the following:

# Convert a Cygwin CLASSPATH when running on Unix

if [ -z "$CYGWIN" ]; then CLASSPATH=`echo $CLASSPATH | sed -e 's/;/:/g' -e 
's|\\|/|g'`; fi

# Convert a non-Cygwin CLASSPATH when running on Cygwin

if [ -n "$CYGWIN" ]; then CLASSPATH=`echo $CLASSPATH | sed -e 's/:/;/g' -e 
's|/|\\|g'`; fi

Note that these don't take into account the DOS driveletter: paths...

Want to unsubscribe from this list?
Check out:

More information about the Cygwin mailing list