[Bug java/45433] Can't find GCCMain in org.eclipse.jdt.internal.compiler.batch.GCCMain

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug java/45433] Can't find GCCMain in org.eclipse.jdt.internal.compiler.batch.GCCMain

brooks at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45433

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #5 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Bruno Haible from comment #4)

> I am having the same error, even with option -C (which does not need a
> -fmain=... option):
>
> $ gcj -v -C HelloWorld.java
> Using built-in specs.
> COLLECT_GCC=/arch/x86-linux/gnu-inst-gcc/4.7.3/bin/gcj
> Target: i686-pc-linux-gnu
> Configured with: ../gcc-4.7.3/configure --build=i686-pc-linux-gnu
> --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu
> --prefix=/arch/x86-linux/gnu-inst-gcc/4.7.3 --enable-shared
> --enable-version-specific-runtime-libs --enable-nls --enable-threads=posix
> --enable-__cxa_atexit --with-as=/arch/x86-linux/gnu/bin/as32
> --with-gmp=/arch/x86-linux/gnu-inst-gcc/4.7.3
> --with-mpfr=/arch/x86-linux/gnu-inst-gcc/4.7.3
> --with-mpc=/arch/x86-linux/gnu-inst-gcc/4.7.3
> --with-libelf=/arch/x86-linux/gnu-inst-gcc/4.7.3
> --with-ecj-jar=/gfs/petix/Volumes/ExtData/source/gnu/gcc/sourceware.org-ecj/
> ecj-latest.jar
> Thread model: posix
> gcc version 4.7.3 (GCC)
> COLLECT_GCC_OPTIONS='-fsaw-java-file' '-B'
> '/media/nas/pub/arch/x86-linux/gnu-inst-gcc/4.7.3/libexec/gcc/i686-pc-linux-
> gnu/4.7.3' '-v' '-C'
> '-fbootclasspath=./:/media/nas/pub/arch/x86-linux/gnu-inst-gcc/4.7.3/bin/../
> lib/gcc/../../share/java/libgcj-4.7.3.jar' '-g1' '-fsyntax-only'
> '-femit-class-files' '-S' '-o' 'NONE' '-shared-libgcc' '-mtune=generic'
> '-march=pentiumpro'
>  /media/nas/pub/arch/x86-linux/gnu-inst-gcc/4.7.3/libexec/gcc/i686-pc-linux-
> gnu/4.7.3/ecj1 HelloWorld.java -g1
> -fbootclasspath=./:/media/nas/pub/arch/x86-linux/gnu-inst-gcc/4.7.3/bin/../
> lib/gcc/../../share/java/libgcj-4.7.3.jar -g1 -fsource=1.5 -ftarget=1.5
> -fzip-dependency /tmp/ccrzqP4M.zip
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org.eclipse.jdt.internal.compiler.batch.GCCMain
>    at gnu.java.lang.MainThread.run(MainThread.java:100)
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.jdt.internal.compiler.batch.GCCMain not found in
> gnu.gcj.runtime.SystemClassLoader{urls=[],
> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
>    at java.net.URLClassLoader.findClass(URLClassLoader.java)
>    at gnu.gcj.runtime.SystemClassLoader.findClass(natSystemClassLoader.cc:27)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:387)
>    at gnu.java.lang.MainThread.run(MainThread.java)
>
> The problem is that the file that I specified as --with-ecj-jar value when
> configuring GCC no longer exists. The GCC installation has not copied the
> file to the GCC installation directory! But the ecj1 program still
> references it.
>
> I cannot find an option to tell ecj1 about the new file name of
> ecj-latest.jar. So I ended up creating a symlink so that the old file name
> still works.

GCC 4.7 is no longer supported; the only open branch where java is still
included is GCC 6, and it is only open for regression fixes and docs only.