[fedora-java] ecj classpath

David Walluck david at zarb.org
Wed Aug 3 17:47:26 UTC 2005


Gary Benson <gbenson at redhat.com> wrote:

> David Walluck wrote:
>> When trying to compile with ecj, I am getting the following error:
>>
>> The type java.lang.Object cannot be resolved
>>
>> I am confused as to how ecj finds rt.jar since I don't see it being
>> added to the classpath or bootclasspath. I have even tried adding it
>> explicitly to either of these and it doesn't seem to help.
>
> I've seen that error before, but only when things have been
> egregiously broken.  You're using i386 packages, right?  What're
> your versions of eclipse-ecj, libgcj and java-1.4.2-gcj-compat?

I am rebuilding the Fedora packages (x86 arch), since, for example, I 
would like
a standalone ecj package that could eventually go to jpackage.org. 
However, I am
trying not to change anything such that I would create a problem that didn't
exist before. If I ``simply'' rebuild java-1.4.2-gcj compat (40jpp_43rh) and
then try to run ecj, the above error happens. Yet, if I use the rebuilt rpm
everything seems to work.

The ecj package is made from portions of the eclipse spec (from 
3.1.0_fc-12). I
did note that gij is supposed to find rt.jar based on a hardcoded path to java
home (by passing `--with-java-home' when configure libgcj). This is set to the
directory of java-gcj-compat even though the gcc rpm doesn't depend on this
package (as far as I can tell). I suspect that running gij directly (without
having java-gcj-compat installed) will make it fail to find rt.jar. Of course,
this doesn't explain what's happening because rt.jar exists in the path
specified by `--with-java-home' and ecj is linked to libgcj and not launched
with gij.

-- 
Sincerely,

David Walluck
<david at zarb.org>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the java-devel mailing list