Running Eclipse with gcj/gij
What do you need
If you want to run it yourself you should be familiar with compiling
gcj from source (either current mainline or the gcc-3_3-branch) and
you will need to apply the following patches.
These patches (except the verify.cc change) should be applied to CVS
soon so you might not need them.
Update: The following new patches are highly recommended.
That last patch will optimize classloading for Eclipse that doesn't need any natively compiled classes but should not be used for normal gcj usage. The other patches will hopefully make it into CVS soon.
contains all the above patches plus a few tweaks for getting Eclipse
to work better on the IKVM.NET VM. With all
these patches applied I was able to open, edit and compile the Jaxup Java XML Update engine
project from my friend Erwin
Bolwidt inside Eclipse. The new screenshot
When you have build and installed the new GCC you will need to make
the following changes to the install.
This is all needed because eclipse expects a tradition java environment.
It should be easy to hack org/eclipse/jdt/internal/launching/StandardVMType.java to recognize gcj by default.
- Go inside the bin directory of the new GCC install and make a
java symlink to the gij program. (Eclipse expects a binary
called java, you can give the -vm gij option, but then it
won't autodetect gcj as Standard VM.)
- Copy the share/java/libgcj.jar file to lib/rt.jar.
Then create a directory jre/lib/ and make another copy of the
rt.jar here. (Note that these cannot be symlinks.)
- Make a directory src and copy the gnu, java,
javax and org directories from the libjava source
directory in it. Then create a src.zip file which contains this src
directory. Put this src.zip file in the parent directory of the dir
you installed the new GCC in. So if you installed in
/usr/local/gcc34/, then put the src.zip in /usr/local/
(This is needed for extra WOW! in the code editing screenshot.)
The following is no longer needed with the latest patches.
Disable the garbage collector by export GC_DONT_GC=1. If you
don't do this eclipse will not startup properly and you will find a
stacktrace in the workspace/.metadata/.log file mentioning a
InvocationTargetException caused by a
Finally get the
latest stable Eclipse build (you want the eclipse-SDK-M4-linux-gtk.zip.)
It will create a directory eclipse and comes with all the sources
(and a precompiled binary and the classes in jar files).