[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: WTF: All those eclipse packages (and som gcj questions)



Hi,

On Sat, 2005-12-17 at 16:35 +0100, Michael Koch wrote:
> > Also the generics don't work when using the java-gcj-compat VM as you
> > suggested for beeing able to use ecj as compiler.
> 
> All language extensions from Java 5.0 work with GCJ 4.0. The main problem
> is just that you cant use the Java 5.0 API which use generics as this is
> not included in GCC 4.0 (and not in 4.1 either) yet. It will hopefully be
> included in GCC 4.2. To be able to use generics extended API of Java 5.0
> you will need classpath-generics which is not in debian yet. We will hopefully
> upload this soon. Then you can e.g. use Vector<String> and such stuff.

I got this working, see http://gnu.wildebeest.org/diary/index.php?p=139
But you do need classpath-generics and the latest jamvm to make this
work. If you have those then you can "tweak"[1] the java-gcj-compat
package to use the classpath-generics glibj.zip and jamvm runtime to run
programs written in eclipse as follows:
- Replace the /usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre/lib/rt.jar
link with a link to the classpath-generics glibj.zip.
- Replace the /usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre/bin/java link
with a link to the jamvm binary.

That will make sure that gcj itself still uses its own libgcj.jar, but
the eclipse ecj compiler will use the classpath-generics glibj.zip to
get access to the genericized method signatures. And that when you run
any program written in eclipse it will be run with the jamvm interpreter
instead of using gij which doesn't yet understand the new class byte
code.

Cheers,

Mark

[1] This will actually break the package a bit, so don't do this unless
you know how to revert it.

-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: