Re: [jnc-users] Null PointerExceptionatjava.net.URLClassLoader.getPermissions
Status: Beta
Brought to you by:
soapy
From: Keith B. <kei...@fl...> - 2009-11-26 08:45:40
|
Hi Marco, I think I may be making "some" progress and I have a feeling this may be the thread you are talking about: http://sourceforge.net/mailarchive/forum.php?thread_name=46E7A0BF.2060301%40gmx.ch&forum_name=javacompiler-users More specifically I'm guessing this part of the thread is what could well be relevant: "lets just try to manually include all xml objects into the binary: 1. create a temporary folder. e.g. d:\test 2. open "cmd" and change into that folder 3. extract all objects from libgcj.a (run in cmd): path_to\gcc-122233-win\bin\ar.exe x path_to\gcc-122233-win\lib\libgcj.a 4. Delete all extracted files that have no "xml" in the name (you know how to do that automatically, right?) 5. Now remove the two files I sent you before and instead, in step 3 in the GUI, add the directory: d:\test\* With this procedure, you've the complete XML support in your binary. If everything works, you might want to try to remove some of the objects (if the application still works without them, they're not needed)..." Now, no matter what I do it doesn't seem to increase the size of the binary (and I get the same error), so I'm guessing I'm doing something wrong to get them added. I performed steps 1, 2 and 3 no problem. I skipped step 4 for now. I've tried step 5 although as I say it didn't increase the size of the binary so I'm assuming nothing extra made it into the binary. One thing I did notice is that your instructions suggest adding the directory "d:\test\*" however, adding \* seems to be impossible using your GUI as the directory browsing dialog simply removes it. If it navigate to the said directory using the dialog and then manually add the \* (or /*) it simply get's removed. Another interesting note is that, if I add the options as custom GCJ options like; org.xml.sax.driver.o it simply fails with cannot find file. But if I add the option as c:\temp\templib\org.xml.sax.driver.o it doesn't complain but nothing seems to be added to the binary. I feel I'm really close but either something is wrong or I'm missing something fundamental. I'm using your latest GUI with GCC downloaded from your site. Here's the GUI settings that may be relevant: Step 1 Files: None Directories: c:\temp\templib Archives: filesquirrel.jar, flaresdk.jar, smtp.jar, dsn.jar, log4j-1.2.13.jar, dom4j-1.6.1.jar, commons-io.1.2.jar, mailapi.jar, pop3.jar, imap.jar. (All with checkbox ticked for complete compilation). Step 2 Main class: com.flare.applications.FileSquirrel.App java.library.path: None Use CNI: Ticked Omit stripping, omit packing, disable optimization all not ticked Step 3 Custom GCJ Flags C:\temp\templib\javax.xml.parsers.DocumentBuilderFactory.o C:\temp\templib\javax.xml.parsers.SAXParserFactory.o C:\temp\templib\javax.xml.parsers.TransformerFactory.o C:\temp\templib\org.relaxng.datatype.DatatypeLibraryFactory.o C:\temp\templib\org.xml.sax.driver.o -findirect-dispatch Exclude GUI, Exclude JCE, Add GNU regex all ticked Compilation and packing executes just fine, however I still get the Caused by: java.lang.ClassNotFoundException: org.xml.sax.EntityResolver not found exception. Obviously I'm still fighting it, but any pointers would be greatly appreciated. Keith |