delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/11/06/15:16:57

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_GC
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Philipp Kraus <philipp DOT kraus AT flashpixx DOT de>
Subject: Re: gcj exception compiling
Date: Sun, 6 Nov 2011 21:16:00 +0100
Lines: 59
Message-ID: <j96pu0$t14$1@dough.gmane.org>
References: <3E1FD932-EE66-4151-A2B4-026F1D6FA7F0 AT flashpixx DOT de> <1320542893 DOT 7860 DOT 7 DOT camel AT YAAKOV04>
Mime-Version: 1.0
User-Agent: Unison/2.1.5
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

> On Sat, 2011-11-05 at 19:13 +0100, Kraus Philipp wrote:
>> Hello,
>> 
>> 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
>> nal.compiler.batch.GCCMain
>> at gnu.java.lang.MainThread.run(Unknown 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 java.net.URLClassLoader.findClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at gnu.java.lang.MainThread.run(Unknown Source)
> 
> You're missing the ECJ jar.  Either download
> ftp://sourceware.org/pub/java/ecj-4.5.jar 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 download_ecj.sh
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 mysource.java" I get the error:

/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../libcygwin.a(libcmain.o):(.text+0xa9): 

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

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

Thanks
Phil



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019