how to build libgcj.dll?

Marco Trudel marco@mtsystems.ch
Thu Dec 13 15:43:00 GMT 2007


Aamir Yaseen wrote:
> Thanks Trudel for quick reply,
> 
> I am using gcj (GCC) 4.3.0 20061204 (experimental). by using this I am 
> getting this exception.
> any other version can u suggest please?

Actually, the change I meant was done in 4.2 if I remember right. Looks 
like a regression or at least like they changed it back...

>  >> add the message bundles explicitly to the compilation
> Can u please help me in syntax how an i add the message bundles 
> explicitly to the compilation ? Command?

Poor Google... Nothing to do today...

Well, do something like:
ar x libgcj.a # extracts a lot of objects
gcj yourstuff messagebundles-something.o


Hope that helps
Marco

> I am using following command to create .exe for my application
> gcj --main=com.edb.edbplus -Djava.library.path=.\lib -oedbplus.exe -s 
> -O2 -I%PWD%\lib\edb-jdbc14.jar @%SOURCES_LST%
> 
> 
> Regards,
> *Aamir Yaseen*
> 
> 
> On Dec 13, 2007 8:11 PM, Marco Trudel < marco@mtsystems.ch 
> <mailto:marco@mtsystems.ch>> wrote:
> 
>     Aamir Yaseen wrote:
>      > Hi,
>      > I am newbie to gcc/gcj world.
>      >
>      > I am able to build my application exe using gcj but application
>     is throwing
>      > following exception when executed
>      >
>      >
>      > Exception in thread "main" java.lang.ExceptionInInitializerError
>      >    at java.lang.Class.initializeClass(edbplus.exe)
>      >    at gnu.java.util.regex.RE.getLocalizedMessage(edbplus.exe)
>      >    at gnu.java.util.regex.RESyntax.<clinit>(edbplus.exe)
>      >    at java.lang.Class.initializeClass (edbplus.exe)
>      >    at java.util.regex.Pattern.<init>(edbplus.exe)
>      >    at java.util.regex.Pattern.compile(edbplus.exe)
>      >    at java.util.regex.Pattern.compile(edbplus.exe)
>      >    at java.lang.String.split (edbplus.exe)
>      >    at com.edb.Settings.connectDB(edbplus.exe)
>      >    at com.edb.edbplus.main(edbplus.exe)
>      > Caused by: java.util.MissingResourceException: Bundle
>      > gnu/java/util/regex/MessagesBundle not found
>      >    at java.util.ResourceBundle.getBundle(edbplus.exe)
>      >    at java.util.ResourceBundle.getBundle(edbplus.exe)
>      >    at gnu.java.util.regex.RE.<clinit>(edbplus.exe)
>      >    at java.lang.Class.initializeClass (edbplus.exe)
>      >    ...9 more
> 
>     This is a known issue with static linking (asking google will give you
>     good results). In newer GCJ revisions, you only need the MessageBundles
>     if you have errors in your regular expression.
>     So, you can either update to a newer GCJ or add the message bundles
>     explicitly to the compilation (they are in libgcj.a, you can extract
>     them using "ar").
> 
> 
>     Marco
> 
>      > This exception can be emilinated after addding libgcj.jar in
>     classpath.
>      >
>      > But i would like to create Executable inependent of any jar file
>     so is there
>      > any way i can avoid this libgcj dependency or I can create
>     libgcj.dll to be
>      > shipped with application instead of libgcj.jar ?
>      >
>      >
>      > Regards,
>      > Aamir Yaseen
>      >
> 



More information about the Java mailing list