Re: [jnc-users] Null PointerExceptionatjava.net.URLClassLoader.getPermissions
Status: Beta
Brought to you by:
soapy
From: Marco T. <ma...@mt...> - 2009-11-26 08:56:23
|
Dear Keith Keith Boynton wrote: > 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)..." Exactly what I was talking about. > 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. Yep, that's what I would have suggested (skipping 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. It has to be added as custom GCJ option, not as source directory. > 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. Well, it's GCJ. It doesn't know what to do with org.xml.sax.driver.o. Of course you have to specify the directory. > 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. As said in Step 5, please add "C:\temp\templib\*" so you're sure all libgcj object will be included. This should result in a way bigger executable. Also you can check the compilation output to see if the flag was used. > 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 Why? Don't tick that unless you really know what you're doing. > Omit stripping, omit packing, disable optimization all not ticked I would omit packing for now, it only takes a lot of time. > 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 Well, adding indirect-dispatch can lead to objects not included. There might be the source of the problem. But I guess you need it because of all the Jar archives you're using. > Exclude GUI, Exclude JCE, Add GNU regex all ticked Untick them all for testing purposes now. Otherwise you get mutliple references errors. Hope that helps Marco > 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 |