delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/04/20:31:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 4 Jan 2003 20:31:47 -0500
From: Christopher Faylor <cgf-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: javac on cygwin
Message-ID: <20030105013147.GC11814@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20030104115231 DOT 62364 DOT qmail AT web10401 DOT mail DOT yahoo DOT com> <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030104080555 DOT 01e83058 AT pop3 DOT cris DOT com> <5 DOT 2 DOT 0 DOT 9 DOT 2 DOT 20030104161638 DOT 01fbee88 AT pop3 DOT cris DOT com>
Mime-Version: 1.0
In-Reply-To: <5.2.0.9.2.20030104161638.01fbee88@pop3.cris.com>
User-Agent: Mutt/1.5.1i

On Sat, Jan 04, 2003 at 04:20:36PM -0800, Randall R Schulz wrote:
>At 14:17 2003-01-04, Shankar Unni wrote:
>>Randall R Schulz wrote:
>>
>>>Javac is not particularly special. It is a Windows-native program, and as 
>>>such requires absolute file and directory names be provided in Windows 
>>>format (forward slashes are OK, but drive letters are required and the 
>>>Cygwin notion of root is completely unknown to such programs).
>>
>>Javac is a pure java program. The "windows executable" is only there as a 
>>thin native wrapper that launches sun.tools.javac.Main.
>
>That may be true, but it's irrelevant. Its external interface via its 
>command line options follows the Windows conventions. That's all that 
>matters. It is a Windows executable for all intents and purposes.
>
>
>>The bigger problem is that Sun JRE is compiled to the native Win32 API, 
>>not to cygwin, so *any* Java programs running in the Sun JRE will never 
>>understand cygwin mount points.
>
>Yes, of course. That's hardly surprising.
>
>
>>In theory, someone could invest in the effort to port, say, the Linux port 
>>of the Sun JRE to cygwin, but it would be a huge effort.
>>
>>Igor's idea (wrappers that run cygpath -m on the paths being passed to 
>>Java) would be the best approach in this situation, especially for 
>>well-known Java programs like "javac".
>
>That's what I do. I have a generic one that converts anything that "looks 
>like" a file name via cygpath. It's not fool-proof, but the criteria for 
>converting names could be refined.
>
>The alternative is a target-specific script that understands what all the 
>arguments options and option arguments are and converts them as needed.

I remember speculating at one point about creating wrappers to the win32
functions like CreateFile, MoveFile, etc.  which would understand cygwin
paths.  You could theoretically modify an .exe to load cygwin1.dll and
use the wrapper functions.  Or you could use some of Windows hook
facilities to do that.

I don't think my idea met with much enthusiasm when I mentioned it, but
I always thought it would be an interesting exercise.  It wouldn't help
for programs which actually do parsing on input file specs outside of
the standard Windows API, though.

cgf

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019