[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin
Subject:    Re: Java
From:       Shankar Unni <shankarunni () netscape ! net>
Date:       2007-06-13 1:51:01
Message-ID: f4nii6$t8e$1 () sea ! gmane ! org
[Download RAW message or body]

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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic