Is GNU's Java Compiler (GCJ) dead? [closed]
Asked Answered
R

4

41

As of October 2010, is GNU's Java compiler dead? Are there any active alternatives (especially for compiling Java to native code)?

LLVM solutions would be preferred.

Rockett answered 27/10, 2010 at 16:39 Comment(2)
take a look at RoboVMThromboembolism
tromey.com/blog/?p=911 - Can't argue that it's anything but dead now (though in reality it died a death a long time before it was removed from trunk.)Cuman
T
28

You could use IKVM and Mono's ahead of time compiler to generate native code.

EDIT

There is an example at the bottom of this page.

Transmittal answered 27/10, 2010 at 16:41 Comment(9)
IKVM does not create native code. It produce only another type of byte code for the .NET universe.Reposeful
@Horcrux7, read my answer more carefully and actually visit the link. Mono can generate native machine code from .NET bytecode. So in combination with IKVM, you can produce native code.Transmittal
Obviously whoever is down voting me didn't read the OP or my answer, or doesn't believe me. Actually look at the link I provided. He asked for alternatives for native code generation, and that is what I gave him.Transmittal
Ok, you means AOT mono-project.com/AOT. Yes, it produce some type of native code.Reposeful
@Horcrux7, AOT = ahead of timeTransmittal
how does this compare to the Android Runtime?Thromboembolism
@Transmittal Sorry if it sounds silly, but it says Mono and IKMV depends on GNU classpath, so if I want to use Oracle JDK, is it as simple as adding Oracle JDK to the class path?Scandinavian
Now I'm confused: Is this a Windows-only or a cross-platform solution?Edie
@iamcreasy If it depends on GNU CLASSPATH it is dead, for the reasons enumerated in my answer.Concerto
C
24

A more pertinent question would be whether it was ever really alive. Consider these issues, from its own website:

  • 1.2 support is 'still incomplete'.
  • 1.3 ditto.
  • The project was last updated over a year ago [as of October 2009].
  • Currently 'supports most of the 1.4 libraries plus some 1.5 additions.'
  • Doesn't support java.nio.
  • Doesn't support javax.naming ('complete but no providers').
  • Doesn't support javax.sql.
  • Doesn't support AWT or Swing.
  • Doesn't support localization via java.text.
  • State of java.security is 'unknown'.
  • Doesn't check permissions in java.lang.reflect.
  • Does it compile generics?
  • Huge chunks missing out of other packages, e.g. nearly 50% of java.util.
  • No annotations.
  • No script engine.
  • Nearly all of javax.xml.* (recursively) is missing.
  • No org.omg.CORBA.
  • Practically no org.w3c.
  • Current comparison with JDK 1.6 is here. Note that this appears to add percentages to give a completely meaningless total.

And note that it isn't billed as a 'Java compiler'. It is a compiler for a subset of Java known as GNU CLASSPATH. Which in turn hasn't been updated since Feb 2009.

If it isn't dead it is certainly lying down.

EDIT It's dead. GCJ is no longer listed as a GNU package. And after four years of zero activity we are entitled to assume the same about GNU CLASSPATH.

Concerto answered 28/10, 2010 at 6:39 Comment(4)
GNU Classpath was updated in March 2012: savannah.gnu.org/forum/forum.php?forum_id=7156Thromboembolism
@JanusTroelsen And it has not been updated subsequently, even though I am writing this nearly three years after posting my answer, and six months after your comment. Proves the point, nicht war? I also don't see anything in that page that corrects even the majority of the numerous deficiencies I cited, directly from their own site.Concerto
And pronounced dead by one of its authors, as of October 2016: tromey.com/blog/?p=911Alcides
@Alcides Well spotted. Reading that, and considering even just the first bullet point above, it would probably have been more accurate for me to say that GCJ was never alive in the first place.Concerto
I
6

One alternative to compile Java to native is Excelsior JET.

Indigested answered 27/10, 2010 at 16:54 Comment(1)
This project has been discontinued as of 2019: excelsiorjet.com (website will be taken down in the middle of June 2019). The only current Java-to-native compiler remaining today is graalvm.org as far as I know.Sargeant
R
1

I think not that it is dead. It has only few important. Which result in a slow development. There are 3 fact because it has only few important today:

  • It based on the GNU Classpath. Since Java is open source (OpenJDK) there is no large need for another open source Java. This has slow down the development speed.
  • The Java was faster in the last years. The GCJ output is not faster. In many cases it is slower.
  • The GNU Classpath has many incompatibility.
Reposeful answered 27/10, 2010 at 19:4 Comment(2)
1 year without an update has become 6. It's dead.Roley
Officially dead since last October: tromey.com/blog/?p=911Alcides

© 2022 - 2024 — McMap. All rights reserved.