Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Fri, 17 Aug 2001 10:32:25 +0200
From: Daniel Steinmann <daniel.steinmann@insonic.com>
To: Noel L Yap <yap_noel@jpmorgan.com>
Cc: cygwin@sourceware.cygnus.com
Subject: Re: jdk
Message-ID: <20010817103225.D200@stonie.insonic.com>
References: <85256AAA.006DE0ED.00@nyc-ntgw-n01.ny.jpmorgan.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <85256AAA.006DE0ED.00@nyc-ntgw-n01.ny.jpmorgan.com>; from yap_noel@jpmorgan.com on Thu, Aug 16, 2001 at 04:00:11PM -0400


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/

