Java alternatives (was Re: Updated: stable compiler package gcc4-4.3.4-3)

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Tue Dec 29 05:31:00 GMT 2009


On 11/12/2009 14:58, Dave Korn wrote:
> As part of its infrastructure, GCJ uses the Eclipse Compiler for Java (ECJ)
> to compile .java sources files to bytecode .class files.  ECJ is shipped as
> a JAR file, and is not supplied in this distribution (pending resolution of
> licensing status and any self-hosting issues).  It can be downloaded after
> installation by running the supplied "/usr/sbin/download_ecj.sh" script, or
> can be manually downloaded from ftp://sourceware.org/pub/java/ecj-latest.jar,
> and moved and renamed to /usr/share/java/ecj.jar, which is where GCJ expects
> to find it.

I still don't understand what the problem/worry is with licensing.  ECJ 
is under the EFL-1.0, an OSI-approved license.

As for self-hosting, I am finishing up a build of JamVM with GNU 
Classpath that can build and run ecj, ant and its dependencies, 
jdk6-langtools (Sun javac/javah/javadoc/javap), and even GUI toolkits 
SWT, Java-GNOME, and QtJambi.

To that end, I would like to work out with you a change to the 
alternatives(8) management in gcc4-java.  Since it is difficult to 
adjust launcher scripts for Java programs to figure out which Java 
interpreter/compiler to use at runtime, I suggest that programs supply 
symlinks to /usr/bin/java, javac, etc., as so:

Master: gcj-4 -> gcj
Slaves: i686-pc-cygwin-gcj-4 -> i686-pc-cygwin-gcj, gcjh-4 -> gcjh, 
gij-4 -> gij

Master: gij-4 -> java
Slaves: /usr/share/java/libgcj-tools-x.y.z.jar -> /usr/lib/tools.jar

Master: gjavah-4 -> javah

Master: gjar-4 -> jar

Master: gappletviewer-4 -> appletviewer
Slaves: (Classpath tools) gjarsigner-4, gkeytool-4, gnative2ascii-4, etc.

All of these would be with a rank of 40.  Thoughts?

> There are problems with the Java compiler that are less well understood,
> but also manifest themselves as testsuite failures in the thread- and
> process-related tests.

I see there are some things that JamVM/Classpath are able to run that 
GIJ cannot; my classpath patches in Ports SVN may be helpful.

On an unrelated note, 
/usr/sbin/fix-libtool-scripts-for-latest-gcc-runtimes.sh in 4.3.4-3 does 
not have its executable bit set, so the postinstall attempt to call it 
fails (Permission denied).


Yaakov

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



More information about the Cygwin mailing list