Subject: Re: jdk
From: Daniel Steinmann <[email-masked]>
To: Noel L Yap <[email-masked]>
Cc: [email-masked]
Date: Fri, 17 Aug 2001 10:32:25 +0200

Noel L Yap wrote:
> Does anyone know of any jdk-1.2.2 executables (eg javac, java, ...) that
> recognize Cygwin mounts and symlinks?

There are probably none. My workaround is to invoke the program out
of a shell script (see below).

HTH,
Daniel.

----

#! /bin/sh

# Cygwin support.
case "`uname`" in
   CYGWIN*) cygwin=true ;;
   *) cygwin=false ;;
esac

.. snip ...

# For Cygwin, ensure paths are in UNIX format before doing anything 
if $cygwin; then
   [ -n "$CLASSPATH" ] &&
      CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
   ... snip ...
fi

# Enhance CLASSPATH
CLASSPATH=$MYAPP/lib/foo.jar:$CLASSPATH

.. snip ...

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
   [ -n "$CLASSPATH" ] &&
      CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi

java -classpath "$CLASSPATH" com.insonic.foo.bar "$@"

-- 
Daniel Steinmann, Insonic AG, Zuerich, Switzerland
[email-masked], +41 1 317 88 99, fax: +41 1 317 88 90

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/