Re: [jnc-users] IllegalAccessError
Status: Beta
Brought to you by:
soapy
From: chosen f. <cho...@ya...> - 2007-09-11 10:41:59
|
Hi Marco, I've made a small class to better illustrate the problem: public class ReaderFactory { static{ SAXParser.class.getName(); XMLReaderFactory.class.getName(); } public static XMLReader getXMLReader(){ XMLReader xmlreader = null; try { xmlreader = XMLReaderFactory.createXMLReader(); // xmlreader = new SAXParser(); System.out.println(xmlreader.getClass().getName()); } catch (Exception e) { e.printStackTrace(); System.out.println("Initialization error " + e.getMessage()); } return xmlreader; } public static void main(String[] args) { XMLReaderFactory.class.getName(); ReaderFactory.getXMLReader(); } } The settings for compilation are: SOURCE: --- Archives XMLFactory.jar (checked) xerces-2.4.0.jar (checked) BASIC SETTINGS: --- Main class sv.tools.reader.ReaderFactory --- Windows executable (checked) ADVANCED SETTINGS --- Custom GCJ Flags -findirect-dispatch -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser --- ExcludeGUI (checked) Although the exception isn't IllegalAccess, I think I still am not using GCJ properly... I hope my example helps in determining the problem. Thanks. Ariel Marco Trudel <mt...@gm...> wrote: Hey Ariel chosen forsaken wrote: > Hi Marco, > > I was having trouble with like this : > > Exception in thread "main" java.lang.NoClassDefFoundError: > org.xml.sax.helpers.XMLReaderFactory > > so I added this code to my class : > > static { > XMLReaderFactory.class.getName(); > } > > but when I compiled my class, I got an error: During compilation or later, during execution of the compiled binary? > Caused by: java.lang.IllegalAccessError: sv.tools.conf.Configuration > can't access class org.xml.sax.helpers.XMLReaderFactory Can you post a minimal example so I can try to reproduce that? Where comes "sv.tools.conf.Configuration" from? Is this the whole exception? > Is this a JNC or GCJ problem? Thanks. JNC is the bundle of - the JNC GUI, - various precompiled cross and non-cross GCJs and - some enhancements of GCJ (partial classpath exclusion, AWT/Swing support, jar compilation: only referenced classes, ...). So, in this matter (your XML problem), JNC and GCJ is the same thing. Or respectively, it's a GCJ issue since JNC doesn't touch XML handling of GCJ. Marco > > > Ariel > > Send instant messages to your online friends http://uk.messenger.yahoo.com > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users Send instant messages to your online friends http://uk.messenger.yahoo.com |