javacompiler-users Mailing List for javaCompiler (Page 4)
Status: Beta
Brought to you by:
soapy
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(15) |
Aug
(12) |
Sep
(57) |
Oct
(14) |
Nov
(23) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(17) |
Feb
(35) |
Mar
(18) |
Apr
|
May
(4) |
Jun
(2) |
Jul
|
Aug
(12) |
Sep
(15) |
Oct
(15) |
Nov
(8) |
Dec
(4) |
2008 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
(2) |
Jun
|
Jul
(6) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(5) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
(7) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <no...@sm...> - 2007-10-17 10:00:44
|
Marco Trudel schrieb: > Marco Trudel wrote: >> Norman Rieß wrote: >>> Marco Trudel schrieb: >>>> These are dependencies that would lead to a >>>> "ClassNotFoundException" if run into while using the library in a >>>> Sun JRE. You can avoid having to solve all reference when compiling >>>> with JNC by adding "-findirect-dispatch" as custom GCJ flag. It >>>> will then search dependencies at runtime. >>>> >>>> >>> Ok, thank you. That helped with the dependencies. Now there is an >>> error in the main compilation step. >>> >>> creating "LdapInfo" for Linux >>> - processing ldap.jar >>> - processing LdapInfo.jar >>> - main compilation step >>> /tmp/ccUywGVz.o: In function `main':ccIKMEUi.i:(.text+0x30): >>> undefined reference to `JvRunMainName' >>> collect2: ld returned 1 exit status >>> >>> failed... >>> >>> Seems like you encountered this error before. That's what google >>> said, anyway :-) >> >> Is this a clean compilation or are there some precompiled non >> indirect-dispatch objects used (from the jars)? It looks like this is >> the case here... > > Sorry, I assumed you're compiling for Windows. Now I see it's Linux ;-) > As you said already, I run into this problem before. Just follow the > discussion google shows you. It's something about editing libgcj.spec, > but I don't remember it exactly now. > > > Marco > Yes, i applied *lib: %{s-bc-abi:} -lgcj -lm -lpthread -lrt -ldl %(libgcc) %(liborig) instead of *lib: %{static-libgcj:-non_shared} %{s-bc-abi:-lgcj_bc;:-lgcj} %{static-libgcj:-call_shared} -lm -lpthread -lrt -ldl %(libgcc) %(liborig) It compiles now. Now i have to work on those dependencies. Thank you. Norman |
From: Marco T. <ma...@mt...> - 2007-10-17 08:19:03
|
Marco Trudel wrote: > Norman Rieß wrote: >> Marco Trudel schrieb: >>> These are dependencies that would lead to a "ClassNotFoundException" >>> if run into while using the library in a Sun JRE. You can avoid having >>> to solve all reference when compiling with JNC by adding >>> "-findirect-dispatch" as custom GCJ flag. It will then search >>> dependencies at runtime. >>> >>> >> Ok, thank you. That helped with the dependencies. Now there is an error >> in the main compilation step. >> >> creating "LdapInfo" for Linux >> - processing ldap.jar >> - processing LdapInfo.jar >> - main compilation step >> /tmp/ccUywGVz.o: In function `main':ccIKMEUi.i:(.text+0x30): >> undefined reference to `JvRunMainName' >> collect2: ld returned 1 exit status >> >> failed... >> >> Seems like you encountered this error before. That's what google said, >> anyway :-) > > Is this a clean compilation or are there some precompiled non > indirect-dispatch objects used (from the jars)? It looks like this is > the case here... Sorry, I assumed you're compiling for Windows. Now I see it's Linux ;-) As you said already, I run into this problem before. Just follow the discussion google shows you. It's something about editing libgcj.spec, but I don't remember it exactly now. Marco |
From: Marco T. <ma...@mt...> - 2007-10-17 08:16:59
|
Norman Rieß wrote: > Marco Trudel schrieb: >> >> These are dependencies that would lead to a "ClassNotFoundException" >> if run into while using the library in a Sun JRE. You can avoid having >> to solve all reference when compiling with JNC by adding >> "-findirect-dispatch" as custom GCJ flag. It will then search >> dependencies at runtime. >> >> > > Ok, thank you. That helped with the dependencies. Now there is an error > in the main compilation step. > > creating "LdapInfo" for Linux > - processing ldap.jar > - processing LdapInfo.jar > - main compilation step > /tmp/ccUywGVz.o: In function `main':ccIKMEUi.i:(.text+0x30): > undefined reference to `JvRunMainName' > collect2: ld returned 1 exit status > > failed... > > Seems like you encountered this error before. That's what google said, > anyway :-) Is this a clean compilation or are there some precompiled non indirect-dispatch objects used (from the jars)? It looks like this is the case here... Marco |
From: <no...@sm...> - 2007-10-17 07:06:50
|
Marco Trudel schrieb: > > These are dependencies that would lead to a "ClassNotFoundException" > if run into while using the library in a Sun JRE. You can avoid having > to solve all reference when compiling with JNC by adding > "-findirect-dispatch" as custom GCJ flag. It will then search > dependencies at runtime. > > Ok, thank you. That helped with the dependencies. Now there is an error in the main compilation step. creating "LdapInfo" for Linux - processing ldap.jar - processing LdapInfo.jar - main compilation step /tmp/ccUywGVz.o: In function `main':ccIKMEUi.i:(.text+0x30): undefined reference to `JvRunMainName' collect2: ld returned 1 exit status failed... Seems like you encountered this error before. That's what google said, anyway :-) Regards Norman |
From: Marco T. <ma...@mt...> - 2007-10-16 17:46:05
|
Norman Rieß wrote: > Marco Trudel schrieb: >> Norman Rieß wrote: >>> Marco Trudel schrieb: >>>> Hey Norman >>>> >>>> >>>> Either extract the Sun implementation and compile it into the >>>> project or search another LDAP library (JLDAP for example). >>>> >>>> >>>> Hope that helps >>>> Marco >>>> >>> Hi, >>> >>> that is kind of a Problem, too. >>> >>> reating "LdapInfo" for Linux >>> - processing rt.jar >>> com/sun/accessibility/internal/resources/accessibility.java:7: >>> internal compiler error: Segmentation fault >>> Please submit a full bug report, >>> with preprocessed source if appropriate. >>> See <URL:http://gcc.gnu.org/bugs.html> for instructions. >> What is rt.jar? Did you add the complete runtime from Sun? >> What was the result on using another LDAP library? >> >> >> Marco >> > rt.jar is the Runtime from Sun, yes. I set JNC only to comile the needed > sources. Well, you can't compile the whole rt.jar. You will confuse the compiler because most classes will be there twice (java.lang.Object, ...). > I unpacked rt.jar, too and only included the needed parts, but this did > not work either, because of dependencies. This were dependencies, > which are not included in the rt.jar. So why it suddenly asked for > them, i do not know. You have to fill the dependences. I had to do the same when importing AWT/Swing from Sun. I wrote a little tool that does this automatically :-) > Then i portet to JLDAP. This lib however suddenly asks for > org.apache.commons.XXX stuff while compiling in JNC. My first thought > was WTH commons-net!!! These are dependencies that would lead to a "ClassNotFoundException" if run into while using the library in a Sun JRE. You can avoid having to solve all reference when compiling with JNC by adding "-findirect-dispatch" as custom GCJ flag. It will then search dependencies at runtime. Marco > Ok, so i included that too..., but this .jar > wants some org.apache.*somethingtotallydifferent*. At this time i > resinged for today. > > I will post the exact error messages tomorrow. > > Regards > Norman |
From: <no...@sm...> - 2007-10-16 16:13:45
|
Marco Trudel schrieb: > Norman Rieß wrote: >> Marco Trudel schrieb: >>> Hey Norman >>> >>> >>> Either extract the Sun implementation and compile it into the >>> project or search another LDAP library (JLDAP for example). >>> >>> >>> Hope that helps >>> Marco >>> >> Hi, >> >> that is kind of a Problem, too. >> >> reating "LdapInfo" for Linux >> - processing rt.jar >> com/sun/accessibility/internal/resources/accessibility.java:7: >> internal compiler error: Segmentation fault >> Please submit a full bug report, >> with preprocessed source if appropriate. >> See <URL:http://gcc.gnu.org/bugs.html> for instructions. > > What is rt.jar? Did you add the complete runtime from Sun? > What was the result on using another LDAP library? > > > Marco > rt.jar is the Runtime from Sun, yes. I set JNC only to comile the needed sources. I unpacked rt.jar, too and only included the needed parts, but this did not work either, because of dependencies. This were dependencies, which are not included in the rt.jar. So why it suddenly asked for them, i do not know. Then i portet to JLDAP. This lib however suddenly asks for org.apache.commons.XXX stuff while compiling in JNC. My first thought was WTH commons-net!!! Ok, so i included that too..., but this .jar wants some org.apache.*somethingtotallydifferent*. At this time i resinged for today. I will post the exact error messages tomorrow. Regards Norman |
From: Marco T. <ma...@mt...> - 2007-10-16 15:49:54
|
Sean McNamara wrote: > Hi, > > Few questions about the current version of JNC: > 1. What is the state of J2SE 1.6 compatibility with JNC? (clearly, any > code that compiles on Java 1.5 is supposed to work, but I am concerned > about new classes in the J2SE 1.6 spec, or new semantics in e.g. memory.) It's not supported. You can't compile any 1.6 code at all, because the class version will be rejected (changed in GCJ trunk). For new classes, you'll have to wait for GNU Classpath... > 2. Does anyone know of a good (hopefully free) tool to reweave Java 1.6 > code into Java 1.5 code, much like previous tools have been able to step > from 1.5 to 1.4? I am not so concerned about performance, but rather, > the ability to use 1.6 constructs and classes and then distribute such a > program with JNC. I don't know any tools. > 3. Would it be possible to build in all of the enhancements to AWT/Swing > support that JNC provides, to a current snapshot of gcc, which is > forging ahead with new (and possibly broken ;)) support for Java 1.6 > classes and semantics? No, that wouldn't make sense. Now that Sun GPLed their codebase, we have to wait for GNU Classpath to import Suns code. But I don't know the status of that work. > Basically, I don't want to lose any of Marco's enhancements when I > rebuild gcc myself, but would like some guidance on *getting* Java 1.6 > support in JNC apps if it's not already available. Compiling GCC yourself will allow you to compile 1.6 code as long as you avoid classes that are not yet supported. If you want to have AWT/Swing support, you have to check if the GNU Classpath guys have made some progress or import it yourself. Marco > Just so you're not in the dark, here are the major libraries my projects > use: > > 1. SWT > 2. AWT/Swing (though never at the same time as SWT) > 3. Jawin > 4. Pretty brave use of concurrency > 5. Apache Commons stuff (just Collections for now) > 6. JDBC drivers (currently only need Pure Java ones, but no guarantees I > won't need one with a native component in the future) > > Thanks, > > -Sean > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 |
From: Marco T. <ma...@mt...> - 2007-10-16 15:45:41
|
Norman Rieß wrote: > Marco Trudel schrieb: >> Hey Norman >> >> >> Either extract the Sun implementation and compile it into the project >> or search another LDAP library (JLDAP for example). >> >> >> Hope that helps >> Marco >> > Hi, > > that is kind of a Problem, too. > > reating "LdapInfo" for Linux > - processing rt.jar > com/sun/accessibility/internal/resources/accessibility.java:7: > internal compiler error: Segmentation fault > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. What is rt.jar? Did you add the complete runtime from Sun? What was the result on using another LDAP library? Marco |
From: Sean M. <sm...@gm...> - 2007-10-16 15:26:55
|
Hi, Few questions about the current version of JNC: 1. What is the state of J2SE 1.6 compatibility with JNC? (clearly, any code that compiles on Java 1.5 is supposed to work, but I am concerned about new classes in the J2SE 1.6 spec, or new semantics in e.g. memory.) 2. Does anyone know of a good (hopefully free) tool to reweave Java 1.6 code into Java 1.5 code, much like previous tools have been able to step from 1.5to 1.4? I am not so concerned about performance, but rather, the ability to use 1.6 constructs and classes and then distribute such a program with JNC. 3. Would it be possible to build in all of the enhancements to AWT/Swing support that JNC provides, to a current snapshot of gcc, which is forging ahead with new (and possibly broken ;)) support for Java 1.6 classes and semantics? Basically, I don't want to lose any of Marco's enhancements when I rebuild gcc myself, but would like some guidance on *getting* Java 1.6 support in JNC apps if it's not already available. Just so you're not in the dark, here are the major libraries my projects use: 1. SWT 2. AWT/Swing (though never at the same time as SWT) 3. Jawin 4. Pretty brave use of concurrency 5. Apache Commons stuff (just Collections for now) 6. JDBC drivers (currently only need Pure Java ones, but no guarantees I won't need one with a native component in the future) Thanks, -Sean |
From: <no...@sm...> - 2007-10-15 17:13:55
|
Marco Trudel schrieb: > Hey Norman > > > Either extract the Sun implementation and compile it into the project > or search another LDAP library (JLDAP for example). > > > Hope that helps > Marco > Hi, that is kind of a Problem, too. reating "LdapInfo" for Linux - processing rt.jar com/sun/accessibility/internal/resources/accessibility.java:7: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. failed... |
From: Marco T. <ma...@mt...> - 2007-10-15 13:57:52
|
Hey Norman Norman Rieß wrote: > Hello, > > i am using the JNDI-Classes coming with the sun-jre/jdk to do some > LDAP-Querys. Obviously (and most understandable) this class is not > implemented in the gcj. Is there a simmilar class to use or some other > means to get this running in a JNC binary? Either extract the Sun implementation and compile it into the project or search another LDAP library (JLDAP for example). Hope that helps Marco > > The exception to whom it may concern: > > java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory not > found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], > parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} > at java.net.URLClassLoader.findClass(LdapInfo) > at gnu.gcj.runtime.SystemClassLoader.findClass(LdapInfo) > at java.lang.ClassLoader.loadClass(LdapInfo) > at java.lang.ClassLoader.loadClass(LdapInfo) > at java.lang.Class.forName(LdapInfo) > at javax.naming.spi.NamingManager.getInitialContext(LdapInfo) > at javax.naming.InitialContext.getDefaultInitCtx(LdapInfo) > at javax.naming.InitialContext.getURLOrDefaultInitCtx(LdapInfo) > at > javax.naming.directory.InitialDirContext.getURLOrDefaultInitDirCtx(LdapInfo) > at javax.naming.directory.InitialDirContext.search(LdapInfo) > at ldapinfo.LdapQuery.getDirContext(LdapInfo) > at ldapinfo.LdapInfo.main(LdapInfo) > > Regards > Norman > > > ------------------------------------------------------------------------- > 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 |
From: <no...@sm...> - 2007-10-15 13:48:20
|
Hello, i am using the JNDI-Classes coming with the sun-jre/jdk to do some LDAP-Querys. Obviously (and most understandable) this class is not implemented in the gcj. Is there a simmilar class to use or some other means to get this running in a JNC binary? The exception to whom it may concern: java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(LdapInfo) at gnu.gcj.runtime.SystemClassLoader.findClass(LdapInfo) at java.lang.ClassLoader.loadClass(LdapInfo) at java.lang.ClassLoader.loadClass(LdapInfo) at java.lang.Class.forName(LdapInfo) at javax.naming.spi.NamingManager.getInitialContext(LdapInfo) at javax.naming.InitialContext.getDefaultInitCtx(LdapInfo) at javax.naming.InitialContext.getURLOrDefaultInitCtx(LdapInfo) at javax.naming.directory.InitialDirContext.getURLOrDefaultInitDirCtx(LdapInfo) at javax.naming.directory.InitialDirContext.search(LdapInfo) at ldapinfo.LdapQuery.getDirContext(LdapInfo) at ldapinfo.LdapInfo.main(LdapInfo) Regards Norman |
From: Marko M. <ti...@sb...> - 2007-09-13 15:17:45
|
Hi! Thanks a ton, that worked. ;) Bye, Marko Zitat von Marco Trudel <ma...@mt...>: > Hey Marko > > Marko Mocnik wrote: >> Hi! >> >> I have a little swt app using some Euro signs in some Labels. >> Well, there should be Euro signs, but instead there are squares. >> Any idea how to fix that? > > Use UTF8 for your source files and add "--encoding=UTF-8" as custom > GCJ flag. This works for me... > > > Marco > >> Thanks and bye, >> Marko >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> javaCompiler-users mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > |
From: Marco T. <ma...@mt...> - 2007-09-13 14:47:41
|
Hey Marko Marko Mocnik wrote: > Hi! > > I have a little swt app using some Euro signs in some Labels. > Well, there should be Euro signs, but instead there are squares. > Any idea how to fix that? Use UTF8 for your source files and add "--encoding=UTF-8" as custom GCJ flag. This works for me... Marco > Thanks and bye, > Marko > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Marko M. <ti...@sb...> - 2007-09-13 13:07:39
|
Hi! I have a little swt app using some Euro signs in some Labels. Well, there should be Euro signs, but instead there are squares. Any idea how to fix that? Thanks and bye, Marko |
From: Marco T. <mt...@gm...> - 2007-09-12 08:18:08
|
Hey Ariel chosen forsaken wrote: > Hi Marco, > > I tried using your example - I added the file to my source files (on > Step 1 of GUI) and added the gcj flag for the driver.o file (using full > path) - but I got this error: > > Exception in thread "main" java.lang.NoClassDefFoundError: > org.xml.sax.helpers.XMLReaderFactory > at sv.tools.reader.ReaderFactory.main(ReaderFactory.exe) Did you ran this example: public static void main(String[] args) { try { XMLReader xmlreader = XMLReaderFactory.createXMLReader(); System.out.println(xmlreader.getClass().getName()); } catch (Exception e) { e.printStackTrace(); } } Or did you run something else? If you ran something else, please provide a minimal example. Or - assuming you're using the latest JNC and gcc version - 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)... Hope that helps Marco > I also tried adding: > > static{ > org.xml.sax.helpers.XMLReaderFactory.class.getName(); > } > > to no avail... > Is there a specific location to put the static references to the classes? > > Thanks. > > Ariel > > > */Marco Trudel <mt...@gm...>/* wrote: > > Hey Ariel > > chosen forsaken wrote: > > 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(); > > } > > > > > > } > > Unfortunately, XML is always a little circuitous with JNC because the > corresponding objects aren't pulled into the binary by default. For > your > minimal example, two objects are needed. To pull them into the binary, > add the two attached files to your compilation (the java file as > source, > the object file as custom gcj flag). > Then your minimal example can be cleaned up to: > > public static void main(String[] args) > { > try > { > XMLReader xmlreader = XMLReaderFactory.createXMLReader(); > System.out.println(xmlreader.getClass().getName()); > } catch (Exception e) > { > e.printStackTrace(); > } > } > > And the output will be: > gnu.xml.stream.SAXParser > > > hope it helps > Marco > > > > > > > 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 /* 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 > > > > public class JncXmlLoader > { > static > { > gnu.xml.stream.SAXParser.class.getName(); > } > } > > > Send instant messages to your online friends http://uk.messenger.yahoo.com > |
From: chosen f. <cho...@ya...> - 2007-09-12 03:38:34
|
Hi Marco, I tried using your example - I added the file to my source files (on Step 1 of GUI) and added the gcj flag for the driver.o file (using full path) - but I got this error: Exception in thread "main" java.lang.NoClassDefFoundError: org.xml.sax.helpers.XMLReaderFactory at sv.tools.reader.ReaderFactory.main(ReaderFactory.exe) I also tried adding: static{ org.xml.sax.helpers.XMLReaderFactory.class.getName(); } to no avail... Is there a specific location to put the static references to the classes? Thanks. Ariel Marco Trudel <mt...@gm...> wrote: Hey Ariel chosen forsaken wrote: > 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(); > } > > > } Unfortunately, XML is always a little circuitous with JNC because the corresponding objects aren't pulled into the binary by default. For your minimal example, two objects are needed. To pull them into the binary, add the two attached files to your compilation (the java file as source, the object file as custom gcj flag). Then your minimal example can be cleaned up to: public static void main(String[] args) { try { XMLReader xmlreader = XMLReaderFactory.createXMLReader(); System.out.println(xmlreader.getClass().getName()); } catch (Exception e) { e.printStackTrace(); } } And the output will be: gnu.xml.stream.SAXParser hope it helps Marco > > > 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 /* 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 > public class JncXmlLoader { static { gnu.xml.stream.SAXParser.class.getName(); } } Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: Marco T. <mt...@gm...> - 2007-09-11 11:58:51
|
Hey Ariel chosen forsaken wrote: > 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(); > } > > > } Unfortunately, XML is always a little circuitous with JNC because the corresponding objects aren't pulled into the binary by default. For your minimal example, two objects are needed. To pull them into the binary, add the two attached files to your compilation (the java file as source, the object file as custom gcj flag). Then your minimal example can be cleaned up to: public static void main(String[] args) { try { XMLReader xmlreader = XMLReaderFactory.createXMLReader(); System.out.println(xmlreader.getClass().getName()); } catch (Exception e) { e.printStackTrace(); } } And the output will be: gnu.xml.stream.SAXParser hope it helps Marco > > > 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 > |
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 |
From: Marco T. <mt...@gm...> - 2007-09-06 09:33:24
|
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 |
From: chosen f. <cho...@ya...> - 2007-09-06 09:20:44
|
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: Caused by: java.lang.IllegalAccessError: sv.tools.conf.Configuration can't access class org.xml.sax.helpers.XMLReaderFactory Is this a JNC or GCJ problem? Thanks. Ariel Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: Marko M. <ti...@sb...> - 2007-09-05 12:38:36
|
Hi Marco, Thank you for the fast answer. Thinking about it, I will probably opt for the SWT option and drop my =20 Swing/systray4j code... Well, nevertheless, some comments to clarify the situation for you: Zitat von Marco Trudel <mt...@gm...>: > Hey Marko > > Marko Mocnik wrote: >> Hi! [...] >> JDK1_1AttachArgs thread_args; >> s_pVm->AttachCurrentThread( ( void** ) &s_pEnv, &thread_args ); >> --------------------------------------------------------------- >> leave me with a NULL Environment. >> >> I did a quick search in the GNU Bugzilla and couldn=E2=80=99t find anythi= ng on it. > > Directly, I have no idea what could be the reason for this. I think =20 > you should ask this on the GCJ users mailinglist. > I'm currently doing a build of the 20070831 gcc to test that further. If the problem persists I will take further steps. >> Second: >> Without systray, the app launches. >> But after a while, when I click some buttons or tabs, the GUI =20 >> Thread freezes and the app is no longer responding to anything. >> That freezing can=E2=80=99t be fixed to any action, sometimes it happens = =20 >> even before the JFrame is fully visible. > > There's probably a thread race respectively wrong synchronized code. =20 > The mingw port of GCJ has a bug that sometimes wait() can be =20 > signaled by a preceding signal(). > Now please note the Sun Javadoc of wait: > > As in the one argument version, interrupts and spurious wakeups are =20 > possible, and this method should always be used in a loop: > > synchronized (obj) { > while (<condition does not hold>) > obj.wait(); > ... // Perform action appropriate to condition > } > > I guess now that your code doesn't loop for the wait and while - =20 > luckily - it never runs into problems with a Sun JRE, GCJs =20 > additional bug will expose the bug in your code. Sun Java had exactly the same Bug in version 1.2 (or was it IBM Java?) Since then I surround every wait with a loop. Besides, I did not use any Thread-synchonization in the code. > > >> I would really appreciate any help here. > > I assume you're programming AWT/Swing on Windows. If you want to be =20 > rid of any problems, use SWT. It has built-in support for system =20 > tray icons and SWT is fully supported with JNC/GCJ. > Thanks for that tip. It will be some hell of work to port the app, but the benefits are convincin= g. Marko > > Hope that helps > Marco > > >> Thanks and bye, >> >> Marko >> >> >> ------------------------------------------------------------------------- >> 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 > > |
From: Marco T. <mt...@gm...> - 2007-09-05 11:40:35
|
Hey Marko Marko Mocnik wrote: > Hi! > > I am trying to compile a little GUI app with a system tray icon (systray4j). > The app worked fine with sun java, but not to require a JRE is one of > my top goals. Windows? Linux? AWT? Swing? SWT? You'll be best off with SWT. > I used the latest release 1.1.1 with gcc-122233-win > Everything compiled but I ran into two problems: > > First: > Systray4j uses a native thread, which causes trouble. > These lines: > --------------------------------------------------------------- > JDK1_1AttachArgs thread_args; > s_pVm->AttachCurrentThread( ( void** ) &s_pEnv, &thread_args ); > --------------------------------------------------------------- > leave me with a NULL Environment. > > I did a quick search in the GNU Bugzilla and couldn’t find anything on it. Directly, I have no idea what could be the reason for this. I think you should ask this on the GCJ users mailinglist. > Second: > Without systray, the app launches. > But after a while, when I click some buttons or tabs, the GUI Thread > freezes and the app is no longer responding to anything. > That freezing can’t be fixed to any action, sometimes it happens even > before the JFrame is fully visible. There's probably a thread race respectively wrong synchronized code. The mingw port of GCJ has a bug that sometimes wait() can be signaled by a preceding signal(). Now please note the Sun Javadoc of wait: As in the one argument version, interrupts and spurious wakeups are possible, and this method should always be used in a loop: synchronized (obj) { while (<condition does not hold>) obj.wait(); ... // Perform action appropriate to condition } I guess now that your code doesn't loop for the wait and while - luckily - it never runs into problems with a Sun JRE, GCJs additional bug will expose the bug in your code. > I would really appreciate any help here. I assume you're programming AWT/Swing on Windows. If you want to be rid of any problems, use SWT. It has built-in support for system tray icons and SWT is fully supported with JNC/GCJ. Hope that helps Marco > Thanks and bye, > > Marko > > > ------------------------------------------------------------------------- > 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 |
From: Marko M. <ti...@sb...> - 2007-09-05 11:00:54
|
Hi! I am trying to compile a little GUI app with a system tray icon (systray4j). The app worked fine with sun java, but not to require a JRE is one of =20 my top goals. I used the latest release 1.1.1 with gcc-122233-win Everything compiled but I ran into two problems: First: Systray4j uses a native thread, which causes trouble. These lines: --------------------------------------------------------------- JDK1_1AttachArgs thread_args; s_pVm->AttachCurrentThread( ( void** ) &s_pEnv, &thread_args ); --------------------------------------------------------------- leave me with a NULL Environment. I did a quick search in the GNU Bugzilla and couldn=E2=80=99t find anything = on it. Second: Without systray, the app launches. But after a while, when I click some buttons or tabs, the GUI Thread =20 freezes and the app is no longer responding to anything. That freezing can=E2=80=99t be fixed to any action, sometimes it happens eve= n =20 before the JFrame is fully visible. I would really appreciate any help here. Thanks and bye, Marko |
From: Marco T. <mt...@gm...> - 2007-09-04 07:24:38
|
Hey Ariel chosen forsaken wrote: > Hi Marco, > > Is there a way to set system properties for my app in the UI? Yes, add custom GCJ flags: -Djava.fun.path=lib/whatever/hello Marco > Thanks. > 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 |