Path syntax with JRE on Cygwin

Randall R Schulz rschulz@teknowledge.com
Sat Mar 3 10:59:00 GMT 2001


David,

Not only do you not need a distinct JDK for Cygwin, there is in fact no 
such thing.

You'll need to manage POSIX / Windows discrepancies when using the JDK 
tools. That means path names must be Windows format and the CLASSPATH 
environment must be semicolon-separated. Unlike PATH, Cygwin will not 
effect the transformation automatically for you, you must yourself apply 
cygpath when it's necessary to convert form POSIX / Cygwin file names and 
PATH-like variables.

I've attached a couple of scripts I use to make it possible to invoke the 
JDK tools using POSIX names and paths. The "wrapper" script converts file 
name and path arguments (using some heuristics you may have to change) from 
POSIX to Windows format then invokes the actual JDK tool with the Windows 
formatted arguments. MkWrappers creates links (symbolic or hard, according 
ot an option) for each of the individual JDK tools. CygWrapper is the 
script that transforms the arguments and then invokes the real JDK tool.

I find these very handy for Cygwin-based Java development. Good luck!

Randall Schulz
Teknowledge Corp.
Palo Alto, CA USA


At 10:29 3/3/2001, David A. Cobb wrote:
>HI, I do what little "real" work I do these days running in the Cygwin
>[1.1.8] environment from Xemacs--i686-pc-Cygwin--21.1.13 and the JRE
>from the Xemacs.org package repository.  I seem to be having a problem
>because the JRE expects Windows-syntax in CLASSPATH
>"C:/JDK-1.3/bin/classes;etc;etc" rather than
>"\usr\local\i686-pc-Cygwin\jre-1.3\classes:etc:etc" or the like.
>
>Do I need to download and install TWO JDK's, one windows-type for use
>when I'm only in Windows and one X*nix type recompiled for Cygwin for
>use when I'm working?  Or could JDE "fake it" by doing the Cygpath
>conversions behind the curtain?  Or, maybe, I don't really know what I'm
>doing?
>
>--
>David A. Cobb


More information about the Cygwin mailing list