delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/06/12/21:51:48

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Shankar Unni <shankarunni AT netscape DOT 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 AT chicken DOT machinevisionproducts DOT com> <20070611175845 DOT GA3832 AT interface DOT famille DOT thibault DOT fr> <14CFC56C96D8554AA0B8969DB825FEA002C996AB AT chicken DOT machinevisionproducts DOT com> <1181586280 DOT 10997 DOT 18 DOT camel AT jhereg> <14CFC56C96D8554AA0B8969DB825FEA002C996AC AT chicken DOT machinevisionproducts DOT com>
Mime-Version: 1.0
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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

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/

- Raw text -


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