This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj exception compiling

On 2011-11-06 02:28:12 +0100, Yaakov (Cygwin/X) said:

On Sat, 2011-11-05 at 19:13 +0100, Kraus Philipp wrote:

I try to build a Java class with the gcj under Cygwin. I get this error message:

Exception in thread "main" java.lang.NoClassDefFoundError: org.eclipse.jdt.inter
at Source)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.compiler.b
atch.GCCMain not found in gnu.gcj.runtime.SystemClassLoader{urls=[], parent=gnu.
gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at Source)

You're missing the ECJ jar. Either download and install it to /usr/share/java/ecj.jar or install java-ecj from Cygwin Ports.

Thanks, but under /usr/sbin/ should be a script like for downloading and installing, but in my Cygwin version the script does not exists

The class does not have any main function.
On the default gcj installation, it creates this error first:

/usr/lib/gcc/i686-pc-cygwin/4.5.3/ecj1.exe: error while loading shared libraries
: cyggcj-11.dll: cannot open shared object file: No such file or directory

So I install the gcj-11 library, the setup installs gcj-9 on default.

How can I create a working installation?

Install libgcj11.

(P.S. Dave Korn: I took the liberty of fixing this on sourceware.)

If I try to compile a java code with "gcj" I get the error:


undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status

How can I solve the linker problem? (I have installed the newest version of Cygwin)


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]