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

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



On Sat, Dec 17, 2005 at 12:09:08PM +0100, Andreas Pakulat wrote:
> On 17.12.05 12:20:53, Michael Koch wrote:
> > On Sat, Dec 17, 2005 at 01:59:54AM +0100, Andreas Pakulat wrote:
> > > Hi,
> > > 
> > > I do find it really great to have eclipse in debian (finally). Only I'm
> > > a little confused by all those new packages. So here come my questions,
> > > please someone shed some light on this:
> > > 
> > > 1. Do I understand correctly that the "ecj" is a java 1.3/1.4 compiler
> > > that I can get either as "pure-java-version" (via eclipse-ecj) or as
> > > native binary (via eclipse-ecj-gcj). What benefits has ecj above gcj?
> > 
> > ECJ from Eclipse 3.1.x is a Java 5.0 compliant compiler. It can handle
> > all language enhancements of Java 5.0. GCJ 4.0 and the upcoming 4.1
> > cannot handle Java 5.0 stuff. They are more or less Java 1.4 compliant
> > with support for some classes from 5.0 but no language extensions.
> > GCJ can produce bytecode OR native code. ECJ can only produce bytecode.
> > A natively compiled ECJ is mostly faster in producing byecode than GCJ.
> 
> Hmm, how could I benefit from ecj from within eclipse? I mean, what do I
> need to change in the preferences so that Eclipse uses ecj-gcj to
> compile java classes?

Only when using GCJ to run Eclipse and eclipse-ecj-gcj is installed.
There is no other way to use the native ECJ from within eclipse.
Eclipse just calls the main ECJ class inside itself and SUN is not
capable of using the native jars.

> > > 2. Those eclipse-* packages that have a eclipse-*-gcj counterpart: Is
> > > the gcj-version (i.e. natively compiled plugins) faster? What are their
> > > benefit above the normal variant?
> > 
> > When running eclipse with GCJ eclipse is much faster when the
> > eclipse-*-gcj packages are installed because GCJ only integrates a
> > simple interpreter, no JIT, and it can run the native code then.
> 
> Hmm, that raises another question: How to do that? I can of course
> changed the java/javac alternatives to gcj but I'd like to leave the
> default java to be SUN's. Now specifying JAVA_HOME to be /usr doesn't
> work either, eclipse still uses "java" to execute. Using /usr/lib/jvm as
> JAVA_HOME gives an error message from eclipse telling me it's missing a
> binary.

You can use /usr/lib/jvm/java-gcj as JAVA_HOME. When java-gcj-compat is
install there is a complete JRE. When java-gcj-compat-dev is installed
too there is a complete SDK.

> BTW: Why do I have 2 alternatives for "java" coming from GCJ? One points
> to /usr/lib/jvm/java-gcj/bin/java the other one pointing to
> /usr/bin/gij-wrapper-4.0.

One is from the gcj-4.0 package the other from the java-gcj-compat-dev
package. The first just provides a simple javac replacement. The later
provides a complete SDK environment.


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

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



Reply to: