This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: jdk



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
daniel.steinmann@insonic.com, +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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]