Re: [jnc-users] NullPointerExceptionatjava.net.URLClassLoader.getPermissions
Status: Beta
Brought to you by:
soapy
From: Keith B. <kei...@fl...> - 2009-12-03 09:21:54
|
Hi Marco, That certainly does help, I'm a little further down the road and am battling with the following error now. Exception in thread "main" java.lang.NoClassDefFoundError: java.text.DecimalFormat at gnu.xml.transform.Stylesheet.initDefaultDecimalFormat(win32.exe) I've asked a few questions on the java-gcc mailing list, they've been very helpful and have suggested the following: #copy libgcj to a working dir (could be in a different location than /usr/lib/ for you) mkdir -p /tmp/mess_with_libgcj cd /tmp/mess_with_libgcj cp /usr/lib/libgcj.a . #extract all the object from this library ar x libgcj.a #make a lib with only the properties objects ar rvcs libgcj_properties.a *properties*.o #do the (sometimes superfluous) blessing of the lib ranlib libgcj_properties.a #copy the lib to the system lib dir cp libgcj_properties.a /usr/lib/ #goto your source project and this time link-in those properties objects with --whole-archive, this forces the linker to include them even if they aren't statically referenced cd <your source build-tree> *gcj* -o <your prog> -Wl,--whole-archive -lgcj_properties -Wl,--no-whole-archive -static-libgcj --main=<your main> Now, I've tried add the flags (-Wl,--whole-archive -lgcj_properties -Wl,--no-whole-archive) to the Custom GCJ flags section. However I can't seem to add them in the correct order. JNC seems to re-order them for me and it ends up: -Wl,--whole-archive -Wl,--no-whole-archive -lgcj_properties Is this a restriction or am I missing something? Keith |