Re: [Java-gnome-developer] GCJ & java-gnome
Brought to you by:
afcowie
|
From: Andrew C. <an...@op...> - 2009-12-05 05:20:01
|
On Sat, 2009-12-05 at 01:06 +0300, Emad Al-Bloushi wrote:
>
> 1 - Can I compile my java-gnome applications to native machine code
> via GCJ
Hard to say.
In the early days of java-gnome 4.0 we built a proper libgcj .so shared
library as well as our .jar file.
But that was fraught with nightmares.
At the time the GNU Classpath Project was making great strides, but GCJ
[for various historical reasons] does not use the latest Classpath glibj
release and instead forks a copy into the GCC tree from time to time. As
a result, your standard library as provided by libgcj [which is in turn
provided by your GCC] is always 1-3 years behind the latest Classpath
release. If you trip over any bugs, you're screwed.
Worse, if someone had GCJ installed on their system, it would tend to
conflict with a normal [at the time Sun, now Open] JDK if installed, and
there were *many* bugs & build failures for java-gnome as a result.
Needless to say I got tired of it all.
So somewhere around 4.0.6 we ripped the GCJ support out of java-gnome's
build process. Peace and tranquillity was the result.
GCJ is not dead, not by any means. It was a remarkable concept. But most
of the people who were working on it have gone elsewhere.
++
You are, of course, welcome to try and use GCJ [as gcj compiler &
linker, not as a javac lookalike] to (re)build java-gnome and then your
application. It might work for you.
{shrug}
I will note that in the 4.0.0 - 4.0.2 days, GCJ [as compiler and linker]
& GDB were very helpful, especially in figuring out what the signal
handling code was up to. But I haven't needed it in years.
And now that we can run `java` in GDB [2], I don't really expect to need
to go back to GCJ.
If you have a commercial requirement to use GCJ to build your programs,
feel free to contact me off list.
++
If you're having trouble figuring out how to make an app properly
installable and executable and packagable, then that's a different
question.
There are many approaches to that problem. None are ideal.
You might have a look at Slashtime [1]. It has a reasonably sane
approach to ./configure && make && make install. Not saying that it is
great, but it does ok for installing, translations, etc.
AfC
Sydney
[1] http://research.operationaldynamics.com/projects/slashtime/
[2] http://blogs.operationaldynamics.com/andrew/software/free-java/get-java-to-coredump.html
--
Andrew Frederick Cowie
Operational Dynamics is an operations and engineering consultancy
focusing on IT strategy, organizational architecture, systems
review, and effective procedures for change management: enabling
successful deployment of mission critical information technology in
enterprises, worldwide.
http://www.operationaldynamics.com/
Sydney New York Toronto London
|