4 ms·
GCJ was deemed obsolete in 2010, amazing that it was still around until now... http://stackoverflow.com/questions/3032727/java-jre-vs-gcj http://stackoverflow.
by okket 10y ago
GCJ was deemed obsolete in 2010, amazing that it was still around until now...
http://stackoverflow.com/questions/3032727/java-jre-vs-gcj http://stackoverflow.com/questions/3032727/java-jre-vs-gcj
Did anyone used GCJ for something in production?
- marktangotango 10y agoI evaluated gcj to use in a shareware desktop application in the 2000's. The goal was to compile java + SWT into native binaries for distribution. The goal was a slim installer that didn't require the user to futz with installing java, or bunding a jre. Ended up going with Excelsior JET which is a fantastic project. In the end, the full java spec doesn't lend itself to aot, because if you claim to be "real" java you have to include support for runtime classloading, which means there has to be a bytecode interpreter embedded in there somewhere. My thoughts are now, if you really want a java/c# style aot language, vala is the way forward.
- amyjess 10y ago> My thoughts are now, if you really want a java/c# style aot language, vala is the way forward. What about D?
- my123 10y agoC# fully supports AOT since a while.
- swift 10y agoI'm pretty sure that C# AOT does not eliminate the need for a JIT in the runtime system. Just as one example, how could expression trees be implemented without one?
- pjmlp 10y agoYou cannot use them. In .NET Native you have to explicitly inform the compiler of any kind of reflection behavior you might require.
- zgramana 10y agoNot quite right. Mono has the lovely mkbundle tool which can do what the poster wants: AOT your intermediate/byte code and build a statically linked executable containing your app, the runtime, and all your deps (except for key system dynamic libraries like libc or Security.framework, similar to how go works). No restrictions on reflection, unlike .NET Native (which has slightly different design goals). I've used it many times for just this reason with great results. Plus, the runtime was re-licensed to MIT/X11.
- pjmlp 10y agoMy .NET experience is only on Windows, thanks for the clarification.
- krylon 10y agoIIRC, Fedora at one point shipped some Java programs compiled with GCJ, for example Eclipse.
- lmm 10y agoI was part of a student society that used GCJ for the code that ran everything (including generating the website). I have not-so-fond memories of the porting effort to get it working on Sun Java and MySQL 5 (it had originally used 4). It was a different time to be sure.
- int_19h 10y agoOne nice thing that GCJ had was fairly smooth integration with C++ via CNI - much higher level than JNI, and easier to use. https://gcc.gnu.org/onlinedocs/gcj/About-CNI.html#About-CNI https://gcc.gnu.org/onlinedocs/gcj/About-CNI.html#About-CNI Could be used for scripting and extensibility purposes.