Re: Fwd: gcj can not import packages

Andrew Haley <[email protected]> Wed, 9 Nov 2016 13:29:37 +0000
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
On 09/11/16 12:49, mohan NMH wrote:
> On Wed, Nov 9, 2016 at 5:55 PM, Andrew Haley <[email protected]> wrote:
>> On 09/11/16 11:29, mohan NMH wrote:
>>> Can someone help me to understand why gcj can not import packages
>>> while javac can? Any CLASSPATH setting required?
>>
>> java.util.Objects is Java 1.7.  gcj is at the level of 1.4 - 1.5.
> 
> Thanks Andrew. Could you please let me know what makes gcj at level of
> 1.4 - 1.5? Is it /usr/share/java/eclipse-ecj.jar?

It's the GCJ runtime library.

> Before this installation I tried with
> --with-ecj-jar=/usr/share/java/ecj4.4.jar. But the gcj failed to load
> org.eclipse.jdt.internal.compiler.batch.GCCMain.class. The ecj4.4.jar
> contains org.eclipse.jdt.internal.compiler.batch.Main.class while
> eclipse-ecj.jar contains
> org.eclipse.jdt.internal.compiler.batch.GCCMain.class. Therefore I
> chose eclipse-ecj.jar
> 
> Please advise how to upgrade gcj to Java 1.8

It'd take a few programmer-years of work, I suspect.  Maybe one
programmer could do it in a year, but that programmer would have to be
very expert.

GCJ is obsolete and its sources have been deleted from GCC.

Andrew.