X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Shankar Unni <shankarunni@netscape.net>
Subject:  Re: Java
Date:  Tue, 12 Jun 2007 18:51:01 -0700
Lines: 31
Message-ID: <f4nii6$t8e$1@sea.gmane.org>
References:  <14CFC56C96D8554AA0B8969DB825FEA002C996AA@chicken.machinevisionproducts.com>	  	<20070611175845.GA3832@interface.famille.thibault.fr>	  	<14CFC56C96D8554AA0B8969DB825FEA002C996AB@chicken.machinevisionproducts.com>  	<1181586280.10997.18.camel@jhereg> <14CFC56C96D8554AA0B8969DB825FEA002C996AC@chicken.machinevisionproducts.com>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666
In-Reply-To: <14CFC56C96D8554AA0B8969DB825FEA002C996AC@chicken.machinevisionproducts.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Brian D. McGrew wrote:

> None, I was asking if a standard Sun JDK could be installed on cygwin
> and if so, which one?

Of course it can.  But... (you knew there was a but..)

Sun's JDK is a native windows application, which means Java programs 
that it runs won't know how to deal with /cygdrive/c, or any of the 
other cygwin mounts like /usr or /.

So if you have shell (bash) scripts that invoke Java programs, and pass 
absolute paths (Cygwin paths) to them as arguments, you have to be 
careful to invoke "cygpath -m" to convert them to "real" Windows paths 
before passing them to the JDK.

A classic example of this style can be seen in Apache Ant's "bin/ant" 
bash invocation script, which is "Cygwin-aware".

On the other hand, you can invoke Cygwin tools from within Java (using 
Runtime.exec()) with very few problems, because Cygwin does understand 
Windows-style paths (though CGF will grumble about them).

PS. Our company's entire product base is written in Java, and we use 
Cygwin tools in our build and test environment to drive all of our Java 
programs.

The only issues we've ever faced are occasional "line-ending" screwups, 
especially when manipulating files under CVS control..  (check  out from 
CVS, use Wordpad (grr!) to edit, check back in - oops, bogus ^Ms checked 
in to the repository!)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

