javacompiler-users Mailing List for javaCompiler (Page 7)
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: Lee D. P. <le...@3s...> - 2007-02-17 11:08:44
|
Thanks for your help Marco it's much appreciated, and it's now linking :) I just need to sort out the image handlers as per your docs.=20 Keep up the good work.=20 Lee > -----Original Message----- > From: Marco Trudel [mailto:mt...@gm...] > Sent: 17 February 2007 10:00 > To: Lee D. Painter > Cc: A mailing list for general questions and discussions. > Subject: Re: [jnc-users] SWT compile >=20 > Please do not top post... >=20 >=20 > Lee D. Painter wrote: > > Hi Marco, > > > > I read Step 1 of the manual regarding the image handlers but did not see > > the FAQ reference about this error. >=20 > I meant "Why do I get 'multiple definitions of ...' errors when > excluding the GUI or JCE?": > http://jnc.mtsystems.ch/frame_faq.html#multipleDefinitions >=20 >=20 > > Is it enough to remove the > > org.eclipse.swt.awt package from the swt.jar or is there a better way? >=20 > Yes, that would suffice. But I suggest to uncheck the checkbox in the > GUI when adding the jar, then only referenced classes from swt.jar would > be pulled in (thus leaving out org.eclipse.swt.awt.* and also result in > a smaller binary). >=20 >=20 > > Perhaps you already did this for JNC? >=20 > Yes, check the screenshots on the homepage. They show how I compile JNC > with JNC ;-) You'll see that the checkbox for swt.jar is not checked and > thus org.eclipse.swt.awt.* won't be pulled in. >=20 >=20 > Marco >=20 > > > > Regards > > > > Lee > > > > PS: Yes I'm on the list. > > > >> -----Original Message----- > >> From: jav...@li... > >> [mailto:jav...@li...] On Behalf Of > >> Marco Trudel > >> Sent: 17 February 2007 08:42 > >> To: A mailing list for general questions and discussions. > >> Subject: Re: [jnc-users] SWT compile > >> > >> Lee D. Painter wrote: > >>> Hi Marco, > >>> > >>> I had previously had problems with an AWT compile, which after your > > help > >>> I was able to get working. The corrupted GIF image issue however > > meant > >> I released a new version of JNC (1.1) which fixes GIFs. But it seems > > the > >> new GCC version has introduced new trouble with AWT/Swing. I'm on it. > >> So I still recommend to use SWT whenever possible (it will compile > >> flawlessly, binaries will be smaller and the UI looks better). > >> > >> > >>> that we cannot use the compiled .exe so we decided to add an SWT GUI > > to > >>> our agent, which honestly looks much better but I'm now seeing > > errors > >>> when attempting to build this. > >>> > >>> A search in our source code shows no trace of AWT or Swing, and the > >>> compile completes with the exclude GUI option. The problem lies in > >>> linking; here are some the errors I'm seeing. Any advice would be > > very > >>> much appreciated. > >>> > >>> I'm trying to build Windows .exe on Windows with gcc-119844-win. > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0x20): multiple definition of > >>> `java::awt::AWTPermission::AWTPermission(java::lang::String*)' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0xaa0): multiple definition of > >>> `java::awt::Button::Button(java::lang::String*)' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0xc8f0): multiple definition of > >>> `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, > > int, > >>> double, double, int, int, java::awt::Insets*, int, int)' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0xca70): multiple definition of > >>> `java::awt::GridBagLayout::GridBagLayout()' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >> This is explained in the FAQ and in the manual. The problem is that > > SWT > >> uses AWT for the "org.eclipse.swt.awt" package. I assume you compile > > the > >> complete swt.jar into your binary. Thus you need AWT what of course > >> unnecessary enlarges the binary. > >> The solution here is to only import referenced classes from swt.jar. > >> That will omit the "org.eclipse.swt.awt" package and additionally have > >> the advantage of create a smaller binary. > >> But please read the manual topic "Step 1 of 4: Source" since it will > >> create new difficulties you have to consider. It's just a 10 lines > >> description, so you won't have to spend a lot of time reading it :-) > >> > >> > >> Marco > >> > >>> Regards > >>> > >>> Lee > >>>> -----Original Message----- > >>>> From: jav...@li... > >>>> [mailto:jav...@li...] On Behalf > > Of > >>>> Marco Trudel > >>>> Sent: 15 February 2007 08:02 > >>>> To: Steven Blade; A mailing list for general questions and > >>> discussions. > >>>> Subject: Re: [jnc-users] [javaCompiler-users] compiles and executes > >>> but > >>>> throws java exception --help > >>>> > >>>> Please always do "reply all", else we loose the mailinglist... > >>>> > >>>> > >>>> Steven Blade wrote: > >>>>> ok sure thing but please show me where to use the static block of > >>> code > >>>> ok. > >>>> > >>>> Thanks for the sample. Just put that code in an own class (as the > >>>> attached XmlLoader.java) and add this class to the JNC compilation > >>>> source. This will ensure that the needed objects are pulled into > > the > >>>> binary. > >>>> You do not have to change your source. > >>>> > >>>> > >>>>> did it work both ways with you reading and transforming xml ? > >>>> Reading works, writing (transforming) fails. I'll create a > > bugreport > >>>> (it's probably a GNU classpath bug) and hope that the fix will be > > in > >>> JNC > >>>> 1.2. > >>>> > >>>>> one more thing does that mean i have to use gnu's jar instead of > >>> java's > >>>> ? > >>>> > >>>> No, you only have to ensure that your binary contains the xml > > stuff. > >>>> This is done with the static initializer since it references the > > xml > >>>> stuff and thus ld - the linker - will add them. > >>>> > >>>> > >>>> Marco > >>>> > >>>> > >>>>> import java.io.BufferedReader; > >>>>> import java.io.File; > >>>>> import java.io.InputStreamReader; > >>>>> > >>>>> import javax.xml.parsers.SAXParser; > >>>>> import javax.xml.parsers.SAXParserFactory; > >>>>> import javax.xml.transform.OutputKeys; > >>>>> import javax.xml.transform.Transformer; > >>>>> import javax.xml.transform.sax.SAXTransformerFactory; > >>>>> import javax.xml.transform.sax.TransformerHandler; > >>>>> import javax.xml.transform.stream.StreamResult; > >>>>> > >>>>> import org.xml.sax.Attributes; > >>>>> import org.xml.sax.SAXException; > >>>>> import org.xml.sax.helpers.AttributesImpl; > >>>>> import org.xml.sax.helpers.DefaultHandler; > >>>>> > >>>>> > >>>>> public class Foo extends DefaultHandler{ > >>>>> > >>>>> /** > >>>>> * @param args > >>>>> */ > >>>>> private static File file; > >>>>> private static String contents; > >>>>> private static Foo f=3Dnew Foo(); > >>>>> public static void main(String[] args) { > >>>>> // TODO Auto-generated method stub > >>>>> System.out.print("enter location of xml file to read "); > >>>>> BufferedReader input=3Dnew BufferedReader(new > >>>> InputStreamReader(System.in)); > >>>>> try > >>>>> { > >>>>> String sfile=3Dinput.readLine(); > >>>>> file=3Dnew File(sfile); > >>>>> readXml(); > >>>>> System.out.print(contents); > >>>>> writeXml(); > >>>>> }catch(Exception _){_.printStackTrace();} > >>>>> } > >>>>> private static void writeXml() > >>>>> { > >>>>> SAXTransformerFactory > >>>> factory=3D(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > >>>>> try{ > >>>>> StreamResult stream=3Dnew StreamResult(System.out); > >>>>> TransformerHandler > handler=3Dfactory.newTransformerHandler(); > >>>>> Transformer trans=3Dhandler.getTransformer(); > >>>>> trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > >>>>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); > >>>>> handler.setResult(stream); > >>>>> handler.startDocument(); > >>>>> AttributesImpl atts=3Dnew AttributesImpl(); > >>>>> handler.startElement("", "", "test", atts); > >>>>> atts.clear(); > >>>>> handler.startElement("", "", "foo", atts); > >>>>> handler.characters(new char[]{'a','b','c'}, 0, 3); > >>>>> handler.endElement("", "", "foo"); > >>>>> handler.endElement("", "", "test"); > >>>>> handler.endDocument(); > >>>>> }catch(Exception _){_.printStackTrace();} > >>>>> } > >>>>> > >>>>> private static void readXml() > >>>>> { > >>>>> System.out.println("reading xml..."); > >>>>> try{ > >>>>> SAXParserFactory factory=3DSAXParserFactory.newInstance(); // > >>> the > >>>> exception points to this line > >>>>> factory.setValidating(false); > >>>>> SAXParser parser=3Dfactory.newSAXParser(); > >>>>> parser.parse (file, f.new OwnHandler()); > >>>>> } > >>>>> catch(Exception _){_.printStackTrace();} > >>>>> } > >>>>> > >>>>> private class OwnHandler extends DefaultHandler{ > >>>>> > >>>>> public void startElement(String namespaceURI, > >>>>> String sName, > >>>>> String qName, > >>>>> Attributes attrs) throws SAXException{ > >>>>> contents+=3D"<"+qName+">"; > >>>>> } > >>>>> public void endElement(String uri, String localName, String > >>> qName) > >>>> throws SAXException{ > >>>>> contents+=3D"<"+qName+"/>"; > >>>>> } > >>>>> public void characters(char[] buf,int offset,int > length)throws > >>>> SAXException{ > >>>>> contents+=3Dnew String(buf,offset,length); > >>>>> } > >>>>> } > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > > ------------------------------------------------------------------------ > >>>>> <?xml version=3D1.0 encoding=3DUTF-8?> > >>>>> <test> > >>>>> <line>testing java native compiler</line> > >>>>> </test> > >>> > >>> > > ------------------------------------------------------------------------ > >> - > >>> Take Surveys. Earn Cash. Influence the Future of IT > >>> Join SourceForge.net's Techsay panel and you'll get the chance to > > share > >> your > >>> opinions on IT & business topics through brief surveys-and earn cash > >>> > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE > > V > >>> _______________________________________________ > >>> javaCompiler-users mailing list > >>> jav...@li... > >>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > >>> > >> > >> > > ------------------------------------------------------------------------ > > - > >> Take Surveys. Earn Cash. Influence the Future of IT > >> Join SourceForge.net's Techsay panel and you'll get the chance to > > share > >> your > >> opinions on IT & business topics through brief surveys-and earn cash > >> > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE > > V > >> _______________________________________________ > >> javaCompiler-users mailing list > >> jav...@li... > >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > |
From: Lee D. P. <le...@3s...> - 2007-02-17 10:10:05
|
>=20 > Please do not top post... Hmmm ok as you wish.=20 =20 >=20 > Lee D. Painter wrote: > > Hi Marco, > > > > I read Step 1 of the manual regarding the image handlers but did not see > > the FAQ reference about this error. >=20 > I meant "Why do I get 'multiple definitions of ...' errors when > excluding the GUI or JCE?": > http://jnc.mtsystems.ch/frame_faq.html#multipleDefinitions Yes I understood that, I was just explaining that I did not see the FAQ nor the reference to the multiple definitions error until you pointed that out :-) >=20 > > Is it enough to remove the > > org.eclipse.swt.awt package from the swt.jar or is there a better way? >=20 > Yes, that would suffice. But I suggest to uncheck the checkbox in the > GUI when adding the jar, then only referenced classes from swt.jar would > be pulled in (thus leaving out org.eclipse.swt.awt.* and also result in > a smaller binary). >=20 Ok, I had misunderstood setting. =20 > > Perhaps you already did this for JNC? >=20 > Yes, check the screenshots on the homepage. They show how I compile JNC > with JNC ;-) You'll see that the checkbox for swt.jar is not checked and > thus org.eclipse.swt.awt.* won't be pulled in. >=20 >=20 > Marco >=20 > > > > Regards > > > > Lee > > > > PS: Yes I'm on the list. > > > >> -----Original Message----- > >> From: jav...@li... > >> [mailto:jav...@li...] On Behalf Of > >> Marco Trudel > >> Sent: 17 February 2007 08:42 > >> To: A mailing list for general questions and discussions. > >> Subject: Re: [jnc-users] SWT compile > >> > >> Lee D. Painter wrote: > >>> Hi Marco, > >>> > >>> I had previously had problems with an AWT compile, which after your > > help > >>> I was able to get working. The corrupted GIF image issue however > > meant > >> I released a new version of JNC (1.1) which fixes GIFs. But it seems > > the > >> new GCC version has introduced new trouble with AWT/Swing. I'm on it. > >> So I still recommend to use SWT whenever possible (it will compile > >> flawlessly, binaries will be smaller and the UI looks better). > >> > >> > >>> that we cannot use the compiled .exe so we decided to add an SWT GUI > > to > >>> our agent, which honestly looks much better but I'm now seeing > > errors > >>> when attempting to build this. > >>> > >>> A search in our source code shows no trace of AWT or Swing, and the > >>> compile completes with the exclude GUI option. The problem lies in > >>> linking; here are some the errors I'm seeing. Any advice would be > > very > >>> much appreciated. > >>> > >>> I'm trying to build Windows .exe on Windows with gcc-119844-win. > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0x20): multiple definition of > >>> `java::awt::AWTPermission::AWTPermission(java::lang::String*)' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0xaa0): multiple definition of > >>> `java::awt::Button::Button(java::lang::String*)' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0xc8f0): multiple definition of > >>> `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, > > int, > >>> double, double, int, int, java::awt::Insets*, int, int)' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>> 0xca70): multiple definition of > >>> `java::awt::GridBagLayout::GridBagLayout()' > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): first > >>> defined here > >>> > >>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >> This is explained in the FAQ and in the manual. The problem is that > > SWT > >> uses AWT for the "org.eclipse.swt.awt" package. I assume you compile > > the > >> complete swt.jar into your binary. Thus you need AWT what of course > >> unnecessary enlarges the binary. > >> The solution here is to only import referenced classes from swt.jar. > >> That will omit the "org.eclipse.swt.awt" package and additionally have > >> the advantage of create a smaller binary. > >> But please read the manual topic "Step 1 of 4: Source" since it will > >> create new difficulties you have to consider. It's just a 10 lines > >> description, so you won't have to spend a lot of time reading it :-) > >> > >> > >> Marco > >> > >>> Regards > >>> > >>> Lee > >>>> -----Original Message----- > >>>> From: jav...@li... > >>>> [mailto:jav...@li...] On Behalf > > Of > >>>> Marco Trudel > >>>> Sent: 15 February 2007 08:02 > >>>> To: Steven Blade; A mailing list for general questions and > >>> discussions. > >>>> Subject: Re: [jnc-users] [javaCompiler-users] compiles and executes > >>> but > >>>> throws java exception --help > >>>> > >>>> Please always do "reply all", else we loose the mailinglist... > >>>> > >>>> > >>>> Steven Blade wrote: > >>>>> ok sure thing but please show me where to use the static block of > >>> code > >>>> ok. > >>>> > >>>> Thanks for the sample. Just put that code in an own class (as the > >>>> attached XmlLoader.java) and add this class to the JNC compilation > >>>> source. This will ensure that the needed objects are pulled into > > the > >>>> binary. > >>>> You do not have to change your source. > >>>> > >>>> > >>>>> did it work both ways with you reading and transforming xml ? > >>>> Reading works, writing (transforming) fails. I'll create a > > bugreport > >>>> (it's probably a GNU classpath bug) and hope that the fix will be > > in > >>> JNC > >>>> 1.2. > >>>> > >>>>> one more thing does that mean i have to use gnu's jar instead of > >>> java's > >>>> ? > >>>> > >>>> No, you only have to ensure that your binary contains the xml > > stuff. > >>>> This is done with the static initializer since it references the > > xml > >>>> stuff and thus ld - the linker - will add them. > >>>> > >>>> > >>>> Marco > >>>> > >>>> > >>>>> import java.io.BufferedReader; > >>>>> import java.io.File; > >>>>> import java.io.InputStreamReader; > >>>>> > >>>>> import javax.xml.parsers.SAXParser; > >>>>> import javax.xml.parsers.SAXParserFactory; > >>>>> import javax.xml.transform.OutputKeys; > >>>>> import javax.xml.transform.Transformer; > >>>>> import javax.xml.transform.sax.SAXTransformerFactory; > >>>>> import javax.xml.transform.sax.TransformerHandler; > >>>>> import javax.xml.transform.stream.StreamResult; > >>>>> > >>>>> import org.xml.sax.Attributes; > >>>>> import org.xml.sax.SAXException; > >>>>> import org.xml.sax.helpers.AttributesImpl; > >>>>> import org.xml.sax.helpers.DefaultHandler; > >>>>> > >>>>> > >>>>> public class Foo extends DefaultHandler{ > >>>>> > >>>>> /** > >>>>> * @param args > >>>>> */ > >>>>> private static File file; > >>>>> private static String contents; > >>>>> private static Foo f=3Dnew Foo(); > >>>>> public static void main(String[] args) { > >>>>> // TODO Auto-generated method stub > >>>>> System.out.print("enter location of xml file to read "); > >>>>> BufferedReader input=3Dnew BufferedReader(new > >>>> InputStreamReader(System.in)); > >>>>> try > >>>>> { > >>>>> String sfile=3Dinput.readLine(); > >>>>> file=3Dnew File(sfile); > >>>>> readXml(); > >>>>> System.out.print(contents); > >>>>> writeXml(); > >>>>> }catch(Exception _){_.printStackTrace();} > >>>>> } > >>>>> private static void writeXml() > >>>>> { > >>>>> SAXTransformerFactory > >>>> factory=3D(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > >>>>> try{ > >>>>> StreamResult stream=3Dnew StreamResult(System.out); > >>>>> TransformerHandler > handler=3Dfactory.newTransformerHandler(); > >>>>> Transformer trans=3Dhandler.getTransformer(); > >>>>> trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > >>>>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); > >>>>> handler.setResult(stream); > >>>>> handler.startDocument(); > >>>>> AttributesImpl atts=3Dnew AttributesImpl(); > >>>>> handler.startElement("", "", "test", atts); > >>>>> atts.clear(); > >>>>> handler.startElement("", "", "foo", atts); > >>>>> handler.characters(new char[]{'a','b','c'}, 0, 3); > >>>>> handler.endElement("", "", "foo"); > >>>>> handler.endElement("", "", "test"); > >>>>> handler.endDocument(); > >>>>> }catch(Exception _){_.printStackTrace();} > >>>>> } > >>>>> > >>>>> private static void readXml() > >>>>> { > >>>>> System.out.println("reading xml..."); > >>>>> try{ > >>>>> SAXParserFactory factory=3DSAXParserFactory.newInstance(); // > >>> the > >>>> exception points to this line > >>>>> factory.setValidating(false); > >>>>> SAXParser parser=3Dfactory.newSAXParser(); > >>>>> parser.parse (file, f.new OwnHandler()); > >>>>> } > >>>>> catch(Exception _){_.printStackTrace();} > >>>>> } > >>>>> > >>>>> private class OwnHandler extends DefaultHandler{ > >>>>> > >>>>> public void startElement(String namespaceURI, > >>>>> String sName, > >>>>> String qName, > >>>>> Attributes attrs) throws SAXException{ > >>>>> contents+=3D"<"+qName+">"; > >>>>> } > >>>>> public void endElement(String uri, String localName, String > >>> qName) > >>>> throws SAXException{ > >>>>> contents+=3D"<"+qName+"/>"; > >>>>> } > >>>>> public void characters(char[] buf,int offset,int > length)throws > >>>> SAXException{ > >>>>> contents+=3Dnew String(buf,offset,length); > >>>>> } > >>>>> } > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > > ------------------------------------------------------------------------ > >>>>> <?xml version=3D1.0 encoding=3DUTF-8?> > >>>>> <test> > >>>>> <line>testing java native compiler</line> > >>>>> </test> > >>> > >>> > > ------------------------------------------------------------------------ > >> - > >>> Take Surveys. Earn Cash. Influence the Future of IT > >>> Join SourceForge.net's Techsay panel and you'll get the chance to > > share > >> your > >>> opinions on IT & business topics through brief surveys-and earn cash > >>> > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE > > V > >>> _______________________________________________ > >>> javaCompiler-users mailing list > >>> jav...@li... > >>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > >>> > >> > >> > > ------------------------------------------------------------------------ > > - > >> Take Surveys. Earn Cash. Influence the Future of IT > >> Join SourceForge.net's Techsay panel and you'll get the chance to > > share > >> your > >> opinions on IT & business topics through brief surveys-and earn cash > >> > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE > > V > >> _______________________________________________ > >> javaCompiler-users mailing list > >> jav...@li... > >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > |
From: Marco T. <mt...@gm...> - 2007-02-17 10:00:39
|
Please do not top post... Lee D. Painter wrote: > Hi Marco, > > I read Step 1 of the manual regarding the image handlers but did not see > the FAQ reference about this error. I meant "Why do I get 'multiple definitions of ...' errors when excluding the GUI or JCE?": http://jnc.mtsystems.ch/frame_faq.html#multipleDefinitions > Is it enough to remove the > org.eclipse.swt.awt package from the swt.jar or is there a better way? Yes, that would suffice. But I suggest to uncheck the checkbox in the GUI when adding the jar, then only referenced classes from swt.jar would be pulled in (thus leaving out org.eclipse.swt.awt.* and also result in a smaller binary). > Perhaps you already did this for JNC? Yes, check the screenshots on the homepage. They show how I compile JNC with JNC ;-) You'll see that the checkbox for swt.jar is not checked and thus org.eclipse.swt.awt.* won't be pulled in. Marco > > Regards > > Lee > > PS: Yes I'm on the list. > >> -----Original Message----- >> From: jav...@li... >> [mailto:jav...@li...] On Behalf Of >> Marco Trudel >> Sent: 17 February 2007 08:42 >> To: A mailing list for general questions and discussions. >> Subject: Re: [jnc-users] SWT compile >> >> Lee D. Painter wrote: >>> Hi Marco, >>> >>> I had previously had problems with an AWT compile, which after your > help >>> I was able to get working. The corrupted GIF image issue however > meant >> I released a new version of JNC (1.1) which fixes GIFs. But it seems > the >> new GCC version has introduced new trouble with AWT/Swing. I'm on it. >> So I still recommend to use SWT whenever possible (it will compile >> flawlessly, binaries will be smaller and the UI looks better). >> >> >>> that we cannot use the compiled .exe so we decided to add an SWT GUI > to >>> our agent, which honestly looks much better but I'm now seeing > errors >>> when attempting to build this. >>> >>> A search in our source code shows no trace of AWT or Swing, and the >>> compile completes with the exclude GUI option. The problem lies in >>> linking; here are some the errors I'm seeing. Any advice would be > very >>> much appreciated. >>> >>> I'm trying to build Windows .exe on Windows with gcc-119844-win. >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>> 0x20): multiple definition of >>> `java::awt::AWTPermission::AWTPermission(java::lang::String*)' >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): first >>> defined here >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>> 0xaa0): multiple definition of >>> `java::awt::Button::Button(java::lang::String*)' >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): first >>> defined here >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>> 0xc8f0): multiple definition of >>> `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, > int, >>> double, double, int, int, java::awt::Insets*, int, int)' >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): first >>> defined here >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>> 0xca70): multiple definition of >>> `java::awt::GridBagLayout::GridBagLayout()' >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): first >>> defined here >>> >>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >> This is explained in the FAQ and in the manual. The problem is that > SWT >> uses AWT for the "org.eclipse.swt.awt" package. I assume you compile > the >> complete swt.jar into your binary. Thus you need AWT what of course >> unnecessary enlarges the binary. >> The solution here is to only import referenced classes from swt.jar. >> That will omit the "org.eclipse.swt.awt" package and additionally have >> the advantage of create a smaller binary. >> But please read the manual topic "Step 1 of 4: Source" since it will >> create new difficulties you have to consider. It's just a 10 lines >> description, so you won't have to spend a lot of time reading it :-) >> >> >> Marco >> >>> Regards >>> >>> Lee >>>> -----Original Message----- >>>> From: jav...@li... >>>> [mailto:jav...@li...] On Behalf > Of >>>> Marco Trudel >>>> Sent: 15 February 2007 08:02 >>>> To: Steven Blade; A mailing list for general questions and >>> discussions. >>>> Subject: Re: [jnc-users] [javaCompiler-users] compiles and executes >>> but >>>> throws java exception --help >>>> >>>> Please always do "reply all", else we loose the mailinglist... >>>> >>>> >>>> Steven Blade wrote: >>>>> ok sure thing but please show me where to use the static block of >>> code >>>> ok. >>>> >>>> Thanks for the sample. Just put that code in an own class (as the >>>> attached XmlLoader.java) and add this class to the JNC compilation >>>> source. This will ensure that the needed objects are pulled into > the >>>> binary. >>>> You do not have to change your source. >>>> >>>> >>>>> did it work both ways with you reading and transforming xml ? >>>> Reading works, writing (transforming) fails. I'll create a > bugreport >>>> (it's probably a GNU classpath bug) and hope that the fix will be > in >>> JNC >>>> 1.2. >>>> >>>>> one more thing does that mean i have to use gnu's jar instead of >>> java's >>>> ? >>>> >>>> No, you only have to ensure that your binary contains the xml > stuff. >>>> This is done with the static initializer since it references the > xml >>>> stuff and thus ld - the linker - will add them. >>>> >>>> >>>> Marco >>>> >>>> >>>>> import java.io.BufferedReader; >>>>> import java.io.File; >>>>> import java.io.InputStreamReader; >>>>> >>>>> import javax.xml.parsers.SAXParser; >>>>> import javax.xml.parsers.SAXParserFactory; >>>>> import javax.xml.transform.OutputKeys; >>>>> import javax.xml.transform.Transformer; >>>>> import javax.xml.transform.sax.SAXTransformerFactory; >>>>> import javax.xml.transform.sax.TransformerHandler; >>>>> import javax.xml.transform.stream.StreamResult; >>>>> >>>>> import org.xml.sax.Attributes; >>>>> import org.xml.sax.SAXException; >>>>> import org.xml.sax.helpers.AttributesImpl; >>>>> import org.xml.sax.helpers.DefaultHandler; >>>>> >>>>> >>>>> public class Foo extends DefaultHandler{ >>>>> >>>>> /** >>>>> * @param args >>>>> */ >>>>> private static File file; >>>>> private static String contents; >>>>> private static Foo f=new Foo(); >>>>> public static void main(String[] args) { >>>>> // TODO Auto-generated method stub >>>>> System.out.print("enter location of xml file to read "); >>>>> BufferedReader input=new BufferedReader(new >>>> InputStreamReader(System.in)); >>>>> try >>>>> { >>>>> String sfile=input.readLine(); >>>>> file=new File(sfile); >>>>> readXml(); >>>>> System.out.print(contents); >>>>> writeXml(); >>>>> }catch(Exception _){_.printStackTrace();} >>>>> } >>>>> private static void writeXml() >>>>> { >>>>> SAXTransformerFactory >>>> factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); >>>>> try{ >>>>> StreamResult stream=new StreamResult(System.out); >>>>> TransformerHandler handler=factory.newTransformerHandler(); >>>>> Transformer trans=handler.getTransformer(); >>>>> trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); >>>>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); >>>>> handler.setResult(stream); >>>>> handler.startDocument(); >>>>> AttributesImpl atts=new AttributesImpl(); >>>>> handler.startElement("", "", "test", atts); >>>>> atts.clear(); >>>>> handler.startElement("", "", "foo", atts); >>>>> handler.characters(new char[]{'a','b','c'}, 0, 3); >>>>> handler.endElement("", "", "foo"); >>>>> handler.endElement("", "", "test"); >>>>> handler.endDocument(); >>>>> }catch(Exception _){_.printStackTrace();} >>>>> } >>>>> >>>>> private static void readXml() >>>>> { >>>>> System.out.println("reading xml..."); >>>>> try{ >>>>> SAXParserFactory factory=SAXParserFactory.newInstance(); // >>> the >>>> exception points to this line >>>>> factory.setValidating(false); >>>>> SAXParser parser=factory.newSAXParser(); >>>>> parser.parse (file, f.new OwnHandler()); >>>>> } >>>>> catch(Exception _){_.printStackTrace();} >>>>> } >>>>> >>>>> private class OwnHandler extends DefaultHandler{ >>>>> >>>>> public void startElement(String namespaceURI, >>>>> String sName, >>>>> String qName, >>>>> Attributes attrs) throws SAXException{ >>>>> contents+="<"+qName+">"; >>>>> } >>>>> public void endElement(String uri, String localName, String >>> qName) >>>> throws SAXException{ >>>>> contents+="<"+qName+"/>"; >>>>> } >>>>> public void characters(char[] buf,int offset,int length)throws >>>> SAXException{ >>>>> contents+=new String(buf,offset,length); >>>>> } >>>>> } >>>>> } >>>>> >>>>> >>>>> >>>>> >>>>> > ------------------------------------------------------------------------ >>>>> <?xml version=1.0 encoding=UTF-8?> >>>>> <test> >>>>> <line>testing java native compiler</line> >>>>> </test> >>> >>> > ------------------------------------------------------------------------ >> - >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to > share >> your >>> opinions on IT & business topics through brief surveys-and earn cash >>> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE > V >>> _______________________________________________ >>> javaCompiler-users mailing list >>> jav...@li... >>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users >>> >> >> > ------------------------------------------------------------------------ > - >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to > share >> your >> opinions on IT & business topics through brief surveys-and earn cash >> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE > V >> _______________________________________________ >> javaCompiler-users mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |
From: Lee D. P. <le...@3s...> - 2007-02-17 09:53:11
|
Hi Marco, I read Step 1 of the manual regarding the image handlers but did not see the FAQ reference about this error. Is it enough to remove the org.eclipse.swt.awt package from the swt.jar or is there a better way? Perhaps you already did this for JNC?=20 Regards Lee PS: Yes I'm on the list.=20 > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 17 February 2007 08:42 > To: A mailing list for general questions and discussions. > Subject: Re: [jnc-users] SWT compile >=20 > Lee D. Painter wrote: > > Hi Marco, > > > > I had previously had problems with an AWT compile, which after your help > > I was able to get working. The corrupted GIF image issue however meant >=20 > I released a new version of JNC (1.1) which fixes GIFs. But it seems the > new GCC version has introduced new trouble with AWT/Swing. I'm on it. > So I still recommend to use SWT whenever possible (it will compile > flawlessly, binaries will be smaller and the UI looks better). >=20 >=20 > > that we cannot use the compiled .exe so we decided to add an SWT GUI to > > our agent, which honestly looks much better but I'm now seeing errors > > when attempting to build this. > > > > A search in our source code shows no trace of AWT or Swing, and the > > compile completes with the exclude GUI option. The problem lies in > > linking; here are some the errors I'm seeing. Any advice would be very > > much appreciated. > > > > I'm trying to build Windows .exe on Windows with gcc-119844-win. > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > > 0x20): multiple definition of > > `java::awt::AWTPermission::AWTPermission(java::lang::String*)' > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): first > > defined here > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > > 0xaa0): multiple definition of > > `java::awt::Button::Button(java::lang::String*)' > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): first > > defined here > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > > 0xc8f0): multiple definition of > > `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, int, > > double, double, int, int, java::awt::Insets*, int, int)' > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): first > > defined here > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > > 0xca70): multiple definition of > > `java::awt::GridBagLayout::GridBagLayout()' > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): first > > defined here > > > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >=20 > This is explained in the FAQ and in the manual. The problem is that SWT > uses AWT for the "org.eclipse.swt.awt" package. I assume you compile the > complete swt.jar into your binary. Thus you need AWT what of course > unnecessary enlarges the binary. > The solution here is to only import referenced classes from swt.jar. > That will omit the "org.eclipse.swt.awt" package and additionally have > the advantage of create a smaller binary. > But please read the manual topic "Step 1 of 4: Source" since it will > create new difficulties you have to consider. It's just a 10 lines > description, so you won't have to spend a lot of time reading it :-) >=20 >=20 > Marco >=20 > > Regards > > > > Lee > >> -----Original Message----- > >> From: jav...@li... > >> [mailto:jav...@li...] On Behalf Of > >> Marco Trudel > >> Sent: 15 February 2007 08:02 > >> To: Steven Blade; A mailing list for general questions and > > discussions. > >> Subject: Re: [jnc-users] [javaCompiler-users] compiles and executes > > but > >> throws java exception --help > >> > >> Please always do "reply all", else we loose the mailinglist... > >> > >> > >> Steven Blade wrote: > >>> ok sure thing but please show me where to use the static block of > > code > >> ok. > >> > >> Thanks for the sample. Just put that code in an own class (as the > >> attached XmlLoader.java) and add this class to the JNC compilation > >> source. This will ensure that the needed objects are pulled into the > >> binary. > >> You do not have to change your source. > >> > >> > >>> did it work both ways with you reading and transforming xml ? > >> Reading works, writing (transforming) fails. I'll create a bugreport > >> (it's probably a GNU classpath bug) and hope that the fix will be in > > JNC > >> 1.2. > >> > >>> one more thing does that mean i have to use gnu's jar instead of > > java's > >> ? > >> > >> No, you only have to ensure that your binary contains the xml stuff. > >> This is done with the static initializer since it references the xml > >> stuff and thus ld - the linker - will add them. > >> > >> > >> Marco > >> > >> > >>> import java.io.BufferedReader; > >>> import java.io.File; > >>> import java.io.InputStreamReader; > >>> > >>> import javax.xml.parsers.SAXParser; > >>> import javax.xml.parsers.SAXParserFactory; > >>> import javax.xml.transform.OutputKeys; > >>> import javax.xml.transform.Transformer; > >>> import javax.xml.transform.sax.SAXTransformerFactory; > >>> import javax.xml.transform.sax.TransformerHandler; > >>> import javax.xml.transform.stream.StreamResult; > >>> > >>> import org.xml.sax.Attributes; > >>> import org.xml.sax.SAXException; > >>> import org.xml.sax.helpers.AttributesImpl; > >>> import org.xml.sax.helpers.DefaultHandler; > >>> > >>> > >>> public class Foo extends DefaultHandler{ > >>> > >>> /** > >>> * @param args > >>> */ > >>> private static File file; > >>> private static String contents; > >>> private static Foo f=3Dnew Foo(); > >>> public static void main(String[] args) { > >>> // TODO Auto-generated method stub > >>> System.out.print("enter location of xml file to read "); > >>> BufferedReader input=3Dnew BufferedReader(new > >> InputStreamReader(System.in)); > >>> try > >>> { > >>> String sfile=3Dinput.readLine(); > >>> file=3Dnew File(sfile); > >>> readXml(); > >>> System.out.print(contents); > >>> writeXml(); > >>> }catch(Exception _){_.printStackTrace();} > >>> } > >>> private static void writeXml() > >>> { > >>> SAXTransformerFactory > >> = factory=3D(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > >>> try{ > >>> StreamResult stream=3Dnew StreamResult(System.out); > >>> TransformerHandler handler=3Dfactory.newTransformerHandler(); > >>> Transformer trans=3Dhandler.getTransformer(); > >>> trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > >>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); > >>> handler.setResult(stream); > >>> handler.startDocument(); > >>> AttributesImpl atts=3Dnew AttributesImpl(); > >>> handler.startElement("", "", "test", atts); > >>> atts.clear(); > >>> handler.startElement("", "", "foo", atts); > >>> handler.characters(new char[]{'a','b','c'}, 0, 3); > >>> handler.endElement("", "", "foo"); > >>> handler.endElement("", "", "test"); > >>> handler.endDocument(); > >>> }catch(Exception _){_.printStackTrace();} > >>> } > >>> > >>> private static void readXml() > >>> { > >>> System.out.println("reading xml..."); > >>> try{ > >>> SAXParserFactory factory=3DSAXParserFactory.newInstance(); // > > the > >> exception points to this line > >>> factory.setValidating(false); > >>> SAXParser parser=3Dfactory.newSAXParser(); > >>> parser.parse (file, f.new OwnHandler()); > >>> } > >>> catch(Exception _){_.printStackTrace();} > >>> } > >>> > >>> private class OwnHandler extends DefaultHandler{ > >>> > >>> public void startElement(String namespaceURI, > >>> String sName, > >>> String qName, > >>> Attributes attrs) throws SAXException{ > >>> contents+=3D"<"+qName+">"; > >>> } > >>> public void endElement(String uri, String localName, String > > qName) > >> throws SAXException{ > >>> contents+=3D"<"+qName+"/>"; > >>> } > >>> public void characters(char[] buf,int offset,int length)throws > >> SAXException{ > >>> contents+=3Dnew String(buf,offset,length); > >>> } > >>> } > >>> } > >>> > >>> > >>> > >>> > >>> > > ------------------------------------------------------------------------ > >>> <?xml version=3D1.0 encoding=3DUTF-8?> > >>> <test> > >>> <line>testing java native compiler</line> > >>> </test> > > > > > > ------------------------------------------------------------------------ > - > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V > > _______________________________________________ > > javaCompiler-users mailing list > > jav...@li... > > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > >=20 >=20 > ------------------------------------------------------------------------ - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Marco T. <mt...@gm...> - 2007-02-17 08:41:58
|
Lee D. Painter wrote: > Hi Marco, > > I had previously had problems with an AWT compile, which after your help > I was able to get working. The corrupted GIF image issue however meant I released a new version of JNC (1.1) which fixes GIFs. But it seems the new GCC version has introduced new trouble with AWT/Swing. I'm on it. So I still recommend to use SWT whenever possible (it will compile flawlessly, binaries will be smaller and the UI looks better). > that we cannot use the compiled .exe so we decided to add an SWT GUI to > our agent, which honestly looks much better but I'm now seeing errors > when attempting to build this. > > A search in our source code shows no trace of AWT or Swing, and the > compile completes with the exclude GUI option. The problem lies in > linking; here are some the errors I'm seeing. Any advice would be very > much appreciated. > > I'm trying to build Windows .exe on Windows with gcc-119844-win. > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > 0x20): multiple definition of > `java::awt::AWTPermission::AWTPermission(java::lang::String*)' > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): first > defined here > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > 0xaa0): multiple definition of > `java::awt::Button::Button(java::lang::String*)' > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): first > defined here > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > 0xc8f0): multiple definition of > `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, int, > double, double, int, int, java::awt::Insets*, int, int)' > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): first > defined here > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > 0xca70): multiple definition of > `java::awt::GridBagLayout::GridBagLayout()' > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): first > defined here > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- This is explained in the FAQ and in the manual. The problem is that SWT uses AWT for the "org.eclipse.swt.awt" package. I assume you compile the complete swt.jar into your binary. Thus you need AWT what of course unnecessary enlarges the binary. The solution here is to only import referenced classes from swt.jar. That will omit the "org.eclipse.swt.awt" package and additionally have the advantage of create a smaller binary. But please read the manual topic "Step 1 of 4: Source" since it will create new difficulties you have to consider. It's just a 10 lines description, so you won't have to spend a lot of time reading it :-) Marco > Regards > > Lee >> -----Original Message----- >> From: jav...@li... >> [mailto:jav...@li...] On Behalf Of >> Marco Trudel >> Sent: 15 February 2007 08:02 >> To: Steven Blade; A mailing list for general questions and > discussions. >> Subject: Re: [jnc-users] [javaCompiler-users] compiles and executes > but >> throws java exception --help >> >> Please always do "reply all", else we loose the mailinglist... >> >> >> Steven Blade wrote: >>> ok sure thing but please show me where to use the static block of > code >> ok. >> >> Thanks for the sample. Just put that code in an own class (as the >> attached XmlLoader.java) and add this class to the JNC compilation >> source. This will ensure that the needed objects are pulled into the >> binary. >> You do not have to change your source. >> >> >>> did it work both ways with you reading and transforming xml ? >> Reading works, writing (transforming) fails. I'll create a bugreport >> (it's probably a GNU classpath bug) and hope that the fix will be in > JNC >> 1.2. >> >>> one more thing does that mean i have to use gnu's jar instead of > java's >> ? >> >> No, you only have to ensure that your binary contains the xml stuff. >> This is done with the static initializer since it references the xml >> stuff and thus ld - the linker - will add them. >> >> >> Marco >> >> >>> import java.io.BufferedReader; >>> import java.io.File; >>> import java.io.InputStreamReader; >>> >>> import javax.xml.parsers.SAXParser; >>> import javax.xml.parsers.SAXParserFactory; >>> import javax.xml.transform.OutputKeys; >>> import javax.xml.transform.Transformer; >>> import javax.xml.transform.sax.SAXTransformerFactory; >>> import javax.xml.transform.sax.TransformerHandler; >>> import javax.xml.transform.stream.StreamResult; >>> >>> import org.xml.sax.Attributes; >>> import org.xml.sax.SAXException; >>> import org.xml.sax.helpers.AttributesImpl; >>> import org.xml.sax.helpers.DefaultHandler; >>> >>> >>> public class Foo extends DefaultHandler{ >>> >>> /** >>> * @param args >>> */ >>> private static File file; >>> private static String contents; >>> private static Foo f=new Foo(); >>> public static void main(String[] args) { >>> // TODO Auto-generated method stub >>> System.out.print("enter location of xml file to read "); >>> BufferedReader input=new BufferedReader(new >> InputStreamReader(System.in)); >>> try >>> { >>> String sfile=input.readLine(); >>> file=new File(sfile); >>> readXml(); >>> System.out.print(contents); >>> writeXml(); >>> }catch(Exception _){_.printStackTrace();} >>> } >>> private static void writeXml() >>> { >>> SAXTransformerFactory >> factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); >>> try{ >>> StreamResult stream=new StreamResult(System.out); >>> TransformerHandler handler=factory.newTransformerHandler(); >>> Transformer trans=handler.getTransformer(); >>> trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); >>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); >>> handler.setResult(stream); >>> handler.startDocument(); >>> AttributesImpl atts=new AttributesImpl(); >>> handler.startElement("", "", "test", atts); >>> atts.clear(); >>> handler.startElement("", "", "foo", atts); >>> handler.characters(new char[]{'a','b','c'}, 0, 3); >>> handler.endElement("", "", "foo"); >>> handler.endElement("", "", "test"); >>> handler.endDocument(); >>> }catch(Exception _){_.printStackTrace();} >>> } >>> >>> private static void readXml() >>> { >>> System.out.println("reading xml..."); >>> try{ >>> SAXParserFactory factory=SAXParserFactory.newInstance(); // > the >> exception points to this line >>> factory.setValidating(false); >>> SAXParser parser=factory.newSAXParser(); >>> parser.parse (file, f.new OwnHandler()); >>> } >>> catch(Exception _){_.printStackTrace();} >>> } >>> >>> private class OwnHandler extends DefaultHandler{ >>> >>> public void startElement(String namespaceURI, >>> String sName, >>> String qName, >>> Attributes attrs) throws SAXException{ >>> contents+="<"+qName+">"; >>> } >>> public void endElement(String uri, String localName, String > qName) >> throws SAXException{ >>> contents+="<"+qName+"/>"; >>> } >>> public void characters(char[] buf,int offset,int length)throws >> SAXException{ >>> contents+=new String(buf,offset,length); >>> } >>> } >>> } >>> >>> >>> >>> >>> > ------------------------------------------------------------------------ >>> <?xml version=1.0 encoding=UTF-8?> >>> <test> >>> <line>testing java native compiler</line> >>> </test> > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |
From: Lee D. P. <le...@3s...> - 2007-02-16 22:25:02
|
Hi Marco, I had previously had problems with an AWT compile, which after your help I was able to get working. The corrupted GIF image issue however meant that we cannot use the compiled .exe so we decided to add an SWT GUI to our agent, which honestly looks much better but I'm now seeing errors when attempting to build this. A search in our source code shows no trace of AWT or Swing, and the compile completes with the exclude GUI option. The problem lies in linking; here are some the errors I'm seeing. Any advice would be very much appreciated.=20 I'm trying to build Windows .exe on Windows with gcc-119844-win. c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ 0x20): multiple definition of `java::awt::AWTPermission::AWTPermission(java::lang::String*)' =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): first defined here =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ 0xaa0): multiple definition of `java::awt::Button::Button(java::lang::String*)' =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): first defined here =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ 0xc8f0): multiple definition of `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, int, double, double, int, int, java::awt::Insets*, int, int)' =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): first defined here =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ 0xca70): multiple definition of `java::awt::GridBagLayout::GridBagLayout()' =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): first defined here =09 c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- Regards Lee > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 15 February 2007 08:02 > To: Steven Blade; A mailing list for general questions and discussions. > Subject: Re: [jnc-users] [javaCompiler-users] compiles and executes but > throws java exception --help >=20 > Please always do "reply all", else we loose the mailinglist... >=20 >=20 > Steven Blade wrote: > > ok sure thing but please show me where to use the static block of code > ok. >=20 > Thanks for the sample. Just put that code in an own class (as the > attached XmlLoader.java) and add this class to the JNC compilation > source. This will ensure that the needed objects are pulled into the > binary. > You do not have to change your source. >=20 >=20 > > did it work both ways with you reading and transforming xml ? >=20 > Reading works, writing (transforming) fails. I'll create a bugreport > (it's probably a GNU classpath bug) and hope that the fix will be in JNC > 1.2. >=20 > > one more thing does that mean i have to use gnu's jar instead of java's > ? >=20 > No, you only have to ensure that your binary contains the xml stuff. > This is done with the static initializer since it references the xml > stuff and thus ld - the linker - will add them. >=20 >=20 > Marco >=20 >=20 > > import java.io.BufferedReader; > > import java.io.File; > > import java.io.InputStreamReader; > > > > import javax.xml.parsers.SAXParser; > > import javax.xml.parsers.SAXParserFactory; > > import javax.xml.transform.OutputKeys; > > import javax.xml.transform.Transformer; > > import javax.xml.transform.sax.SAXTransformerFactory; > > import javax.xml.transform.sax.TransformerHandler; > > import javax.xml.transform.stream.StreamResult; > > > > import org.xml.sax.Attributes; > > import org.xml.sax.SAXException; > > import org.xml.sax.helpers.AttributesImpl; > > import org.xml.sax.helpers.DefaultHandler; > > > > > > public class Foo extends DefaultHandler{ > > > > /** > > * @param args > > */ > > private static File file; > > private static String contents; > > private static Foo f=3Dnew Foo(); > > public static void main(String[] args) { > > // TODO Auto-generated method stub > > System.out.print("enter location of xml file to read "); > > BufferedReader input=3Dnew BufferedReader(new > InputStreamReader(System.in)); > > try > > { > > String sfile=3Dinput.readLine(); > > file=3Dnew File(sfile); > > readXml(); > > System.out.print(contents); > > writeXml(); > > }catch(Exception _){_.printStackTrace();} > > } > > private static void writeXml() > > { > > SAXTransformerFactory > factory=3D(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > > try{ > > StreamResult stream=3Dnew StreamResult(System.out); > > TransformerHandler handler=3Dfactory.newTransformerHandler(); > > Transformer trans=3Dhandler.getTransformer(); > > trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > > trans.setOutputProperty(OutputKeys.INDENT,"yes"); > > handler.setResult(stream); > > handler.startDocument(); > > AttributesImpl atts=3Dnew AttributesImpl(); > > handler.startElement("", "", "test", atts); > > atts.clear(); > > handler.startElement("", "", "foo", atts); > > handler.characters(new char[]{'a','b','c'}, 0, 3); > > handler.endElement("", "", "foo"); > > handler.endElement("", "", "test"); > > handler.endDocument(); > > }catch(Exception _){_.printStackTrace();} > > } > > > > private static void readXml() > > { > > System.out.println("reading xml..."); > > try{ > > SAXParserFactory factory=3DSAXParserFactory.newInstance(); // the > exception points to this line > > factory.setValidating(false); > > SAXParser parser=3Dfactory.newSAXParser(); > > parser.parse (file, f.new OwnHandler()); > > } > > catch(Exception _){_.printStackTrace();} > > } > > > > private class OwnHandler extends DefaultHandler{ > > > > public void startElement(String namespaceURI, > > String sName, > > String qName, > > Attributes attrs) throws SAXException{ > > contents+=3D"<"+qName+">"; > > } > > public void endElement(String uri, String localName, String qName) > throws SAXException{ > > contents+=3D"<"+qName+"/>"; > > } > > public void characters(char[] buf,int offset,int length)throws > SAXException{ > > contents+=3Dnew String(buf,offset,length); > > } > > } > > } > > > > > > > > > > ------------------------------------------------------------------------ > > > > <?xml version=3D1.0 encoding=3DUTF-8?> > > <test> > > <line>testing java native compiler</line> > > </test> |
From: Marco T. <mt...@gm...> - 2007-02-15 13:01:51
|
Steven Blade wrote: > >package ch.mtSystems.jnc.model.utilities; > *and the package declaration should be the same as you gave me right ? No. It doesn't matter in which class or package it is. The only thing that matters is that the compiler runs into statements like: gnu.xml.dom.ls.SAXEventSink.class.getName(); So that he knows to include gnu.xml.dom.ls.SAXEventSink because you need it. Did you read the manual part about that I told you? It's all explained in there... > i > just create this class in my project in this package after adding the > gnu jar and that's it.* You don't have to do that. Just put the class I gave you or one that you made yourself somewhere on your drive and add it only to the compilation. Don't add a jar to the project or that file to the project when you're developing. It's not necessary and not needed. It's only needed for native compilation and only a hint to the compiler. You won't need it ever... > *but no support for writing xml yet , oh well.* Definitely not the way you did in your sample applications. There probably are hundreds of other ways that will work... > *Maroc thanks alot for your time man, if you have any other suggestions > please tell me .* You could always hire me to fix it or find another solution. Of course that would cost something... Contact me in private if you're interested... Marco > *Thanks* > > On 2/15/07, *Marco Trudel* <mt...@gm... <mailto:mt...@gm...>> wrote: > > Please always do "reply all", else we loose the mailinglist... > > > Steven Blade wrote: > > ok sure thing but please show me where to use the static block of > code ok. > > Thanks for the sample. Just put that code in an own class (as the > attached XmlLoader.java) and add this class to the JNC compilation > source. This will ensure that the needed objects are pulled into the > binary. > You do not have to change your source. > > > > did it work both ways with you reading and transforming xml ? > > Reading works, writing (transforming) fails. I'll create a bugreport > (it's probably a GNU classpath bug) and hope that the fix will be in JNC > 1.2. > > > one more thing does that mean i have to use gnu's jar instead of > java's ? > > No, you only have to ensure that your binary contains the xml stuff. > This is done with the static initializer since it references the xml > stuff and thus ld - the linker - will add them. > > > Marco > > > > import java.io.BufferedReader; > > import java.io.File; > > import java.io.InputStreamReader; > > > > import javax.xml.parsers.SAXParser; > > import javax.xml.parsers.SAXParserFactory; > > import javax.xml.transform.OutputKeys; > > import javax.xml.transform.Transformer ; > > import javax.xml.transform.sax.SAXTransformerFactory; > > import javax.xml.transform.sax.TransformerHandler; > > import javax.xml.transform.stream.StreamResult; > > > > import org.xml.sax.Attributes ; > > import org.xml.sax.SAXException; > > import org.xml.sax.helpers.AttributesImpl; > > import org.xml.sax.helpers.DefaultHandler; > > > > > > public class Foo extends DefaultHandler{ > > > > /** > > * @param args > > */ > > private static File file; > > private static String contents; > > private static Foo f=new Foo(); > > public static void main(String[] args) { > > // TODO Auto-generated method stub > > System.out.print("enter location of xml file to > read "); > > BufferedReader input=new BufferedReader(new > InputStreamReader( System.in <http://System.in>)); > > try > > { > > String sfile=input.readLine(); > > file=new File(sfile); > > readXml(); > > System.out.print(contents); > > writeXml(); > > }catch(Exception _){_.printStackTrace();} > > } > > private static void writeXml() > > { > > SAXTransformerFactory > factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > > try{ > > StreamResult stream=new StreamResult(System.out); > > TransformerHandler handler= > factory.newTransformerHandler(); > > Transformer trans=handler.getTransformer(); > > trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > > trans.setOutputProperty (OutputKeys.INDENT,"yes"); > > handler.setResult(stream); > > handler.startDocument(); > > AttributesImpl atts=new AttributesImpl(); > > handler.startElement("", "", "test", atts); > > atts.clear(); > > handler.startElement("", "", "foo", atts); > > handler.characters(new char[]{'a','b','c'}, 0, 3); > > handler.endElement("", "", "foo"); > > handler.endElement("", "", "test"); > > handler.endDocument(); > > }catch(Exception _){_.printStackTrace();} > > } > > > > private static void readXml() > > { > > System.out.println("reading xml..."); > > try{ > > SAXParserFactory factory= > SAXParserFactory.newInstance(); // the exception points to this line > > factory.setValidating(false); > > SAXParser parser=factory.newSAXParser(); > > parser.parse (file, f.new OwnHandler()); > > } > > catch(Exception _){_.printStackTrace();} > > } > > > > private class OwnHandler extends DefaultHandler{ > > > > public void startElement(String namespaceURI, > > String sName, > > String qName, > > Attributes attrs) throws SAXException{ > > contents+="<"+qName+">"; > > } > > public void endElement(String uri, String localName, > String qName) throws SAXException{ > > contents+="<"+qName+"/>"; > > } > > public void characters(char[] buf,int offset,int > length)throws SAXException{ > > contents+=new String(buf,offset,length); > > } > > } > > } > > > > > > > > > > > ------------------------------------------------------------------------ > > > > <?xml version=1.0 encoding=UTF-8?> > > <test> > > <line>testing java native compiler</line> > > </test> > > > package ch.mtSystems.jnc.model.utilities; > > public class XmlLoader > { > static > { > gnu.xml.dom.ls.SAXEventSink.class.getName(); > gnu.xml.transform.TransformerFactoryImpl.class.getName(); > gnu.xml.xpath.XPathFactoryImpl.class.getName(); > org.xml.sax.ContentHandler.class.getName(); > gnu.xml.stream.SAXParserFactory.class.getName (); > } > } > > > > > -- > kc |
From: Steven B. <dud...@gm...> - 2007-02-15 12:53:06
|
>package ch.mtSystems.jnc.model.utilities; *and the package declaration should be the same as you gave me right ?i just create this class in my project in this package after adding the gnu jar and that's it.* *but no support for writing xml yet , oh well.* *Maroc thanks alot for your time man, if you have any other suggestions please tell me .* *Thanks* On 2/15/07, Marco Trudel <mt...@gm...> wrote: > > Please always do "reply all", else we loose the mailinglist... > > > Steven Blade wrote: > > ok sure thing but please show me where to use the static block of code > ok. > > Thanks for the sample. Just put that code in an own class (as the > attached XmlLoader.java) and add this class to the JNC compilation > source. This will ensure that the needed objects are pulled into the > binary. > You do not have to change your source. > > > > did it work both ways with you reading and transforming xml ? > > Reading works, writing (transforming) fails. I'll create a bugreport > (it's probably a GNU classpath bug) and hope that the fix will be in JNC > 1.2. > > > one more thing does that mean i have to use gnu's jar instead of java's > ? > > No, you only have to ensure that your binary contains the xml stuff. > This is done with the static initializer since it references the xml > stuff and thus ld - the linker - will add them. > > > Marco > > > > import java.io.BufferedReader; > > import java.io.File; > > import java.io.InputStreamReader; > > > > import javax.xml.parsers.SAXParser; > > import javax.xml.parsers.SAXParserFactory; > > import javax.xml.transform.OutputKeys; > > import javax.xml.transform.Transformer; > > import javax.xml.transform.sax.SAXTransformerFactory; > > import javax.xml.transform.sax.TransformerHandler; > > import javax.xml.transform.stream.StreamResult; > > > > import org.xml.sax.Attributes; > > import org.xml.sax.SAXException; > > import org.xml.sax.helpers.AttributesImpl; > > import org.xml.sax.helpers.DefaultHandler; > > > > > > public class Foo extends DefaultHandler{ > > > > /** > > * @param args > > */ > > private static File file; > > private static String contents; > > private static Foo f=new Foo(); > > public static void main(String[] args) { > > // TODO Auto-generated method stub > > System.out.print("enter location of xml file to read "); > > BufferedReader input=new BufferedReader(new > InputStreamReader(System.in)); > > try > > { > > String sfile=input.readLine(); > > file=new File(sfile); > > readXml(); > > System.out.print(contents); > > writeXml(); > > }catch(Exception _){_.printStackTrace();} > > } > > private static void writeXml() > > { > > SAXTransformerFactory > factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > > try{ > > StreamResult stream=new StreamResult(System.out); > > TransformerHandler handler=factory.newTransformerHandler(); > > Transformer trans=handler.getTransformer(); > > trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > > trans.setOutputProperty(OutputKeys.INDENT,"yes"); > > handler.setResult(stream); > > handler.startDocument(); > > AttributesImpl atts=new AttributesImpl(); > > handler.startElement("", "", "test", atts); > > atts.clear(); > > handler.startElement("", "", "foo", atts); > > handler.characters(new char[]{'a','b','c'}, 0, 3); > > handler.endElement("", "", "foo"); > > handler.endElement("", "", "test"); > > handler.endDocument(); > > }catch(Exception _){_.printStackTrace();} > > } > > > > private static void readXml() > > { > > System.out.println("reading xml..."); > > try{ > > SAXParserFactory factory=SAXParserFactory.newInstance(); // the > exception points to this line > > factory.setValidating(false); > > SAXParser parser=factory.newSAXParser(); > > parser.parse (file, f.new OwnHandler()); > > } > > catch(Exception _){_.printStackTrace();} > > } > > > > private class OwnHandler extends DefaultHandler{ > > > > public void startElement(String namespaceURI, > > String sName, > > String qName, > > Attributes attrs) throws SAXException{ > > contents+="<"+qName+">"; > > } > > public void endElement(String uri, String localName, String > qName) throws SAXException{ > > contents+="<"+qName+"/>"; > > } > > public void characters(char[] buf,int offset,int length)throws > SAXException{ > > contents+=new String(buf,offset,length); > > } > > } > > } > > > > > > > > > > ------------------------------------------------------------------------ > > > > <?xml version=1.0 encoding=UTF-8?> > > <test> > > <line>testing java native compiler</line> > > </test> > > > package ch.mtSystems.jnc.model.utilities; > > public class XmlLoader > { > static > { > gnu.xml.dom.ls.SAXEventSink.class.getName(); > gnu.xml.transform.TransformerFactoryImpl.class.getName(); > gnu.xml.xpath.XPathFactoryImpl.class.getName(); > org.xml.sax.ContentHandler.class.getName(); > gnu.xml.stream.SAXParserFactory.class.getName(); > } > } > > -- kc |
From: Marco T. <mt...@gm...> - 2007-02-15 08:02:11
|
Please always do "reply all", else we loose the mailinglist... Steven Blade wrote: > ok sure thing but please show me where to use the static block of code ok. Thanks for the sample. Just put that code in an own class (as the attached XmlLoader.java) and add this class to the JNC compilation source. This will ensure that the needed objects are pulled into the binary. You do not have to change your source. > did it work both ways with you reading and transforming xml ? Reading works, writing (transforming) fails. I'll create a bugreport (it's probably a GNU classpath bug) and hope that the fix will be in JNC 1.2. > one more thing does that mean i have to use gnu's jar instead of java's ? No, you only have to ensure that your binary contains the xml stuff. This is done with the static initializer since it references the xml stuff and thus ld - the linker - will add them. Marco > import java.io.BufferedReader; > import java.io.File; > import java.io.InputStreamReader; > > import javax.xml.parsers.SAXParser; > import javax.xml.parsers.SAXParserFactory; > import javax.xml.transform.OutputKeys; > import javax.xml.transform.Transformer; > import javax.xml.transform.sax.SAXTransformerFactory; > import javax.xml.transform.sax.TransformerHandler; > import javax.xml.transform.stream.StreamResult; > > import org.xml.sax.Attributes; > import org.xml.sax.SAXException; > import org.xml.sax.helpers.AttributesImpl; > import org.xml.sax.helpers.DefaultHandler; > > > public class Foo extends DefaultHandler{ > > /** > * @param args > */ > private static File file; > private static String contents; > private static Foo f=new Foo(); > public static void main(String[] args) { > // TODO Auto-generated method stub > System.out.print("enter location of xml file to read "); > BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); > try > { > String sfile=input.readLine(); > file=new File(sfile); > readXml(); > System.out.print(contents); > writeXml(); > }catch(Exception _){_.printStackTrace();} > } > private static void writeXml() > { > SAXTransformerFactory factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > try{ > StreamResult stream=new StreamResult(System.out); > TransformerHandler handler=factory.newTransformerHandler(); > Transformer trans=handler.getTransformer(); > trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > trans.setOutputProperty(OutputKeys.INDENT,"yes"); > handler.setResult(stream); > handler.startDocument(); > AttributesImpl atts=new AttributesImpl(); > handler.startElement("", "", "test", atts); > atts.clear(); > handler.startElement("", "", "foo", atts); > handler.characters(new char[]{'a','b','c'}, 0, 3); > handler.endElement("", "", "foo"); > handler.endElement("", "", "test"); > handler.endDocument(); > }catch(Exception _){_.printStackTrace();} > } > > private static void readXml() > { > System.out.println("reading xml..."); > try{ > SAXParserFactory factory=SAXParserFactory.newInstance(); // the exception points to this line > factory.setValidating(false); > SAXParser parser=factory.newSAXParser(); > parser.parse (file, f.new OwnHandler()); > } > catch(Exception _){_.printStackTrace();} > } > > private class OwnHandler extends DefaultHandler{ > > public void startElement(String namespaceURI, > String sName, > String qName, > Attributes attrs) throws SAXException{ > contents+="<"+qName+">"; > } > public void endElement(String uri, String localName, String qName) throws SAXException{ > contents+="<"+qName+"/>"; > } > public void characters(char[] buf,int offset,int length)throws SAXException{ > contents+=new String(buf,offset,length); > } > } > } > > > > > ------------------------------------------------------------------------ > > <?xml version=1.0 encoding=UTF-8?> > <test> > <line>testing java native compiler</line> > </test> |
From: Marco T. <mt...@gm...> - 2007-02-15 07:02:05
|
Harpal Grover wrote: > I downloaded the latest JNC, 1.1, and attempted to compile my java app to a > native app. The compilation started, but after awhile stopped working and > JNC just hung, with the following log output: Did you mix .java and .class source files? Does it work with JNC 1.0? A "java_parse_file, at java/jcf-parse.c:1947" error was recently fixed in GCJ. It might be the one you run into (unless you're compiling .java and .class files at the same time). BTW: Adding the custom "-w" flag would suppress all Java warnings you're seeing. Marco > creating "App.exe" for Windows > - processing gface_0.9.1.jar > [C:\gcc-121694-win\bin\gcj > -fjni > -O2 > -Ilibs/win/vrtp/vrtp.jar > -c > C:\projects\java\TSCN\Desktop\lib\gface_0.9.1.jar > -o > C:\projects\java\TSCN\Desktop\lib\gface_0.9.1-win.jar.o > -IC:\Program > Files\eclipse-SDK-3.2-win32\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar] > - main compilation step > [C:\gcc-121694-win\bin\gcj > --main=App > -fjni > -Llibs/win > -Ilibs/win/vrtp/vrtp.jar > -oC:\projects\java\TSCN\Desktop\SwingWT\App.exe > -mwindows > -s > -O2 > -ljncNovrtp > -ljncNoJce > -ljncTrial > -IC:\projects\java\TSCN\Desktop\SwingWT > -IC:\projects\java\TSCN\Desktop\lib\gface_0.9.1.jar > -IC:\Program > Files\eclipse-SDK-3.2-win32\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar > @C:\DOCUME~1\Harps\LOCALS~1\Temp\JNCTemp9az9y9.out\SourceList9az9ya.list] > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:4: > warning: The import java.math.RoundingMode is never used > import java.math.RoundingMode; > ^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:5: > warning: The import java.sql.SQLException is never used > import java.sql.SQLException; > ^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:96: > warning: Type safety: The expression of type HashMap needs unchecked > conversion to conform to HashMap<String,String> > map = new HashMap(); > ^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:96: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > map = new HashMap(); > ^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:99: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList ytrewqSet = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:99: > warning: The local variable ytrewqSet is never read > ArrayList ytrewqSet = new ArrayList(); > ^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:99: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList ytrewqSet = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:114: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList list = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:114: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList list = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:121: > warning: Type safety: The method add(zmko) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > list.add(ytrewqManager.venus(params)); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 10 problems (10 warnings) > C:\projects\java\TSCN\Desktop\SwingWT\vrtp\gfh\\Sdfkijnmkjn.java:3: > warning: The import org.eclipse.swt.graphics.Point is never used > import org.eclipse.swt.graphics.Point; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\vrtp\gfh\\Sdfkijnmkjn.java:8: > warning: The import org.eclipse.swt.graphics.Font is never used > import org.eclipse.swt.graphics.Font; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2 problems (2 warnings) > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\XqW\ghj\OfoofoosOfooXqW.java:22: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public ResultSet venus(HashMap parameters); > ^^^^^^^ > 1 problem (1 warning) > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > jc1.exe: 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. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:189: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > public ArrayList venus() { > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:193: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > public ArrayList venus(HashMap parameters) { > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:193: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public ArrayList venus(HashMap parameters) { > ^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:195: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList list = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:195: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList list = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:199: > warning: Type safety: The method add(zmko) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > list.add((foopPoiLkj)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.ghj.foopPoiLkj")); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 6 problems (6 warnings) > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\Dcgfooh\O9GbvfoosGbvXqW.java:22: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public void prepareGbvxdsert(HashMap parameters) throws SQLException { > ^^^^^^^ > 1 problem (1 warning) > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\reportdfghj.java:3: warning: > The import vrtp.report.ytrewq.oooqwertyytrewqGatherer is never used > import vrtp.report.ytrewq.oooqwertyytrewqGatherer; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\reportdfghj.java:4: warning: > The import vrtp.report.ytrewq.qwertyytrewqGatherer is never used > import vrtp.report.ytrewq.qwertyytrewqGatherer; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\reportdfghj.java:12: warning: > The import qwerty.report.reportqwerty is never used > import qwerty.report.reportqwerty; > ^^^^^^^^^^^^^^^^^^^^^^^^^^ > 3 problems (3 warnings) > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:9: > warning: The import com.Sdftfg.Huj.Ujn.Dcgfooh.foopLkjs is never used > import com.Sdftfg.Huj.Ujn.Dcgfooh.foopLkjs; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:21: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > private ArrayList set = null; > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:45: > warning: Type safety: The expression of type HashMap needs unchecked > conversion to conform to HashMap<String,String> > map = new HashMap(); > ^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:45: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > map = new HashMap(); > ^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:48: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList ytrewqSet = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:48: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList ytrewqSet = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:73: > warning: Type safety: The method add(zmko) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > ytrewqSet.add(new ArrayList()); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:73: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ytrewqSet.add(new ArrayList()); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:76: > warning: Type safety: The method addAll(Collection) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > ((ArrayList)ytrewqSet.venus(i)).addAll(ytrewqManager.venusGbvfoosGbvLkjs(map)); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:904: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > protected void setOfooytrewqSet(ArrayList set) { > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:908: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > protected ArrayList venusOfooytrewqSet() { > ^^^^^^^^^ > 11 problems (11 warnings) > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:7: > warning: The import com.Sdftfg.Huj.O9.lost.O9GbvsXqW is never used > import com.Sdftfg.Huj.O9.lost.O9GbvsXqW; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:241: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > public ArrayList venus() { > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:245: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList jerry = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:245: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList jerry = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:246: > warning: The local variable count is never read > int count = 0; > ^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:248: > warning: Type safety: The method add(zmko) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > jerry.add((drunkLkj)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.drunkLkj")); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:257: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > public ArrayList venus(HashMap map) { > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:257: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public ArrayList venus(HashMap map) { > ^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:261: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList jerry = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:261: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList jerry = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:262: > warning: The local variable count is never read > int count = 0; > ^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:264: > warning: Type safety: The method add(zmko) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > jerry.add((drunkLkj)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.drunkLkj")); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 12 problems (12 warnings) > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\lost\O9janeesXqW.java:74: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public ResultSet selectjane(HashMap parameters) { > ^^^^^^^ > 1 problem (1 warning) > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\Dcgfooh\O9foopsXqW.java:33: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public boolean marsfoops(HashMap parameters) { > ^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\Dcgfooh\O9foopsXqW.java:37: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public ResultSet venusfoops(HashMap parameters) { > ^^^^^^^ > 2 problems (2 warnings) > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:4: > warning: The import com.Sdftfg.Huj.O9.lost.O9GbvsXqW is never used > import com.Sdftfg.Huj.O9.lost.O9GbvsXqW; > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:117: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > public ArrayList venus() { > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:121: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList Lkj = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:121: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList Lkj = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:122: > warning: The local variable count is never read > int count = 0; > ^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:124: > warning: Type safety: The method add(zmko) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > Lkj.add((Lkjs)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.Lkjs")); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:133: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > public ArrayList venus(HashMap map) { > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:133: > warning: HashMap is a raw type. References to generic type HashMap<K,V> > should be parameterized > public ArrayList venus(HashMap map) { > ^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:137: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList Lkj = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:137: > warning: ArrayList is a raw type. References to generic type ArrayList<E> > should be parameterized > ArrayList Lkj = new ArrayList(); > ^^^^^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:138: > warning: The local variable count is never read > int count = 0; > ^^^^^ > C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:140: > warning: Type safety: The method add(zmko) belongs to the raw type > ArrayList. References to generic type ArrayList<E> should be parameterized > Lkj.add((Lkjs)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.Lkjs")); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 12 problems (12 warnings) > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in > java_parse_file, at java/jcf-parse.c:1947 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > > > Has anyone ever seen this before? > > Thanks > > _________________________________________________________________ > Your Space. Your Friends. Your Stories. Share your world with Windows Live > Spaces. http://discoverspaces.live.com/?loc=en-CA > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |
From: Harpal G. <har...@ho...> - 2007-02-15 02:54:37
|
I downloaded the latest JNC, 1.1, and attempted to compile my java app to a native app. The compilation started, but after awhile stopped working and JNC just hung, with the following log output: creating "App.exe" for Windows - processing gface_0.9.1.jar [C:\gcc-121694-win\bin\gcj -fjni -O2 -Ilibs/win/vrtp/vrtp.jar -c C:\projects\java\TSCN\Desktop\lib\gface_0.9.1.jar -o C:\projects\java\TSCN\Desktop\lib\gface_0.9.1-win.jar.o -IC:\Program Files\eclipse-SDK-3.2-win32\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar] - main compilation step [C:\gcc-121694-win\bin\gcj --main=App -fjni -Llibs/win -Ilibs/win/vrtp/vrtp.jar -oC:\projects\java\TSCN\Desktop\SwingWT\App.exe -mwindows -s -O2 -ljncNovrtp -ljncNoJce -ljncTrial -IC:\projects\java\TSCN\Desktop\SwingWT -IC:\projects\java\TSCN\Desktop\lib\gface_0.9.1.jar -IC:\Program Files\eclipse-SDK-3.2-win32\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar @C:\DOCUME~1\Harps\LOCALS~1\Temp\JNCTemp9az9y9.out\SourceList9az9ya.list] C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:4: warning: The import java.math.RoundingMode is never used import java.math.RoundingMode; ^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:5: warning: The import java.sql.SQLException is never used import java.sql.SQLException; ^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:96: warning: Type safety: The expression of type HashMap needs unchecked conversion to conform to HashMap<String,String> map = new HashMap(); ^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:96: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized map = new HashMap(); ^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:99: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList ytrewqSet = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:99: warning: The local variable ytrewqSet is never read ArrayList ytrewqSet = new ArrayList(); ^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:99: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList ytrewqSet = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:114: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList list = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:114: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList list = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\foopfoosfoopCfoo.java:121: warning: Type safety: The method add(zmko) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized list.add(ytrewqManager.venus(params)); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 10 problems (10 warnings) C:\projects\java\TSCN\Desktop\SwingWT\vrtp\gfh\\Sdfkijnmkjn.java:3: warning: The import org.eclipse.swt.graphics.Point is never used import org.eclipse.swt.graphics.Point; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\vrtp\gfh\\Sdfkijnmkjn.java:8: warning: The import org.eclipse.swt.graphics.Font is never used import org.eclipse.swt.graphics.Font; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 problems (2 warnings) C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\XqW\ghj\OfoofoosOfooXqW.java:22: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public ResultSet venus(HashMap parameters); ^^^^^^^ 1 problem (1 warning) C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. jc1.exe: 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. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:189: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized public ArrayList venus() { ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:193: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized public ArrayList venus(HashMap parameters) { ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:193: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public ArrayList venus(HashMap parameters) { ^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:195: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList list = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:195: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList list = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\ghj\foopPoiLkj.java:199: warning: Type safety: The method add(zmko) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized list.add((foopPoiLkj)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.ghj.foopPoiLkj")); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 problems (6 warnings) C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\Dcgfooh\O9GbvfoosGbvXqW.java:22: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public void prepareGbvxdsert(HashMap parameters) throws SQLException { ^^^^^^^ 1 problem (1 warning) C:\projects\java\TSCN\Desktop\SwingWT\gfh\\reportdfghj.java:3: warning: The import vrtp.report.ytrewq.oooqwertyytrewqGatherer is never used import vrtp.report.ytrewq.oooqwertyytrewqGatherer; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\reportdfghj.java:4: warning: The import vrtp.report.ytrewq.qwertyytrewqGatherer is never used import vrtp.report.ytrewq.qwertyytrewqGatherer; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\reportdfghj.java:12: warning: The import qwerty.report.reportqwerty is never used import qwerty.report.reportqwerty; ^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 problems (3 warnings) C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:9: warning: The import com.Sdftfg.Huj.Ujn.Dcgfooh.foopLkjs is never used import com.Sdftfg.Huj.Ujn.Dcgfooh.foopLkjs; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:21: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized private ArrayList set = null; ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:45: warning: Type safety: The expression of type HashMap needs unchecked conversion to conform to HashMap<String,String> map = new HashMap(); ^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:45: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized map = new HashMap(); ^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:48: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList ytrewqSet = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:48: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList ytrewqSet = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:73: warning: Type safety: The method add(zmko) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized ytrewqSet.add(new ArrayList()); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:73: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ytrewqSet.add(new ArrayList()); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:76: warning: Type safety: The method addAll(Collection) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized ((ArrayList)ytrewqSet.venus(i)).addAll(ytrewqManager.venusGbvfoosGbvLkjs(map)); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:904: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized protected void setOfooytrewqSet(ArrayList set) { ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\gfh\\Cfoo\fooh\GbvfoosGbvCfoo.java:908: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized protected ArrayList venusOfooytrewqSet() { ^^^^^^^^^ 11 problems (11 warnings) C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:7: warning: The import com.Sdftfg.Huj.O9.lost.O9GbvsXqW is never used import com.Sdftfg.Huj.O9.lost.O9GbvsXqW; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:241: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized public ArrayList venus() { ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:245: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList jerry = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:245: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList jerry = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:246: warning: The local variable count is never read int count = 0; ^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:248: warning: Type safety: The method add(zmko) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized jerry.add((drunkLkj)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.drunkLkj")); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:257: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized public ArrayList venus(HashMap map) { ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:257: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public ArrayList venus(HashMap map) { ^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:261: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList jerry = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:261: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList jerry = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:262: warning: The local variable count is never read int count = 0; ^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\drunkLkj.java:264: warning: Type safety: The method add(zmko) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized jerry.add((drunkLkj)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.drunkLkj")); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 problems (12 warnings) C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\lost\O9janeesXqW.java:74: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public ResultSet selectjane(HashMap parameters) { ^^^^^^^ 1 problem (1 warning) C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\Dcgfooh\O9foopsXqW.java:33: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public boolean marsfoops(HashMap parameters) { ^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\O9\Dcgfooh\O9foopsXqW.java:37: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public ResultSet venusfoops(HashMap parameters) { ^^^^^^^ 2 problems (2 warnings) C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:4: warning: The import com.Sdftfg.Huj.O9.lost.O9GbvsXqW is never used import com.Sdftfg.Huj.O9.lost.O9GbvsXqW; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:117: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized public ArrayList venus() { ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:121: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList Lkj = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:121: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList Lkj = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:122: warning: The local variable count is never read int count = 0; ^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:124: warning: Type safety: The method add(zmko) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized Lkj.add((Lkjs)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.Lkjs")); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:133: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized public ArrayList venus(HashMap map) { ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:133: warning: HashMap is a raw type. References to generic type HashMap<K,V> should be parameterized public ArrayList venus(HashMap map) { ^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:137: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList Lkj = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:137: warning: ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized ArrayList Lkj = new ArrayList(); ^^^^^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:138: warning: The local variable count is never read int count = 0; ^^^^^ C:\projects\java\TSCN\Desktop\SwingWT\com\Sdftfg\Huj\Ujn\lost\Lkjs.java:140: warning: Type safety: The method add(zmko) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized Lkj.add((Lkjs)Ujndfghj.createUjnzmko(rs,"com.Sdftfg.Huj.Ujn.Lkjs")); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 problems (12 warnings) C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. C:\DOCUME~1\Harps\LOCALS~1\Temp/ccwFcaaa.jar:0: internal compiler error: in java_parse_file, at java/jcf-parse.c:1947 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Has anyone ever seen this before? Thanks _________________________________________________________________ Your Space. Your Friends. Your Stories. Share your world with Windows Live Spaces. http://discoverspaces.live.com/?loc=en-CA |
From: Marco T. <mt...@gm...> - 2007-02-14 13:45:02
|
Steven Blade wrote: > <snip> > > public void trsToXml(String ofile) > { > SAXTransformerFactory > factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > //the exception points to this line > try{ > FileWriter fw=new FileWriter(ofile); > PrintWriter pw=new PrintWriter(fw,true); > StreamResult stream=new StreamResult(pw); > handler=factory.newTransformerHandler(); > Transformer trans=handler.getTransformer(); > trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"trs_xml.dtd"); > trans.setOutputProperty(OutputKeys.INDENT,"yes"); > handler.setResult(stream); > handler.startDocument(); > AttributesImpl atts=new AttributesImpl(); > handler.startElement("", "", "test", atts); > atts.clear(); > handler.startElement("", "", "foo", atts); > handler.characters(new char[]{'a','b','c'}, 0, 3); > handler.endElement("", "", "foo"); > handler.endElement("", "", "test"); > handler.endDocument(); > pw.flush(); > pw.close(); > }catch(Exception _){_.printStackTrace();} > this one throws the first exception > } > public void xmlToTrs(File sfile,String oFileName) > { > PrintWriter pWriter=null; > try{ > SAXParserFactory factory=SAXParserFactory.newInstance(); // the > exception points to this line > factory.setValidating(true); > SAXParser parser=factory.newSAXParser(); > boolean proceed=true; > File trs=new File(oFileName); > if(trs.isFile() && trs.exists()) > { > System.out.println("the file \""+oFileName+"\" already exists\nDo > you wish to overwrite it ? Y/N\n"); > BufferedReader input=new BufferedReader(new > InputStreamReader(System.in <http://System.in>)); > proceed=input.readLine().equalsIgnoreCase("y"); > } > if(proceed) > { > parser.parse (sfile, new DefaultHandler()); > pWriter=new PrintWriter(new FileWriter(trs),true); > pWriter.write(sHeading.toString()+sGeneral.toString()+sItems.toString()); > pWriter.flush(); > } > } > catch(Exception _){_.printStackTrace();} > finally{if(pWriter!=null) pWriter.close();} > } > and this one the second Unfortunately I can't do much with them. What I meant was a self-containing minimal example that I can run. E.g. some stupid parsing or transforming. A XML HelloWorld if you like... So, I just tested the: SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance(); And I need this to get it working: static { gnu.xml.dom.ls.SAXEventSink.class.getName(); gnu.xml.transform.TransformerFactoryImpl.class.getName(); gnu.xml.xpath.XPathFactoryImpl.class.getName(); org.xml.sax.ContentHandler.class.getName(); } Please read the very small "Step 1 of 4: Source" part in the manual to understand why this is necessary. Maybe you need more of them for other XML stuff too... I'd still appreciate a minimal XML HelloWorld if you have time. Attached and not inlined if possible :-) Hope it helps... Marco |
From: Steven B. <dud...@gm...> - 2007-02-14 06:34:14
|
On 2/13/07, Marco Trudel <mt...@gm...> wrote: > > Sorry, forgot to CC you since you're not on the mailinglist... So here > my forwarded answer... > > Steven Blade wrote: > > hi > > i have used JNC to compile a java app that does some xml parsing and > > transformation. > > my app references the javax.xml.parsers and javax.xml.transform, nothing > > fancy in there. > > it compiles fine but whenever i try to instantiate a > > SAXTransformerFactory in my java code, i get the following error > > (Trs_Main is the .exe) > > Exception in thread "main" > > javax.xml.transform.TransformerFactoryConfigurationError: > > gnu.xml.transform.TransformerFactoryImpl > > at java.lang.VMThrowable.fillInStackTrace(Trs_Main.exe) > > at java.lang.Throwable .<init>(Trs_Main.exe) > > at javax.xml.transform.TransformerFactory.newInstance(Trs_Main.exe) // i > > guess this is where the error comes from > > at asy.TrsToXML.split(Trs_Main.exe) > > > > also when i try to instantiate a SAXParserFactory object using > > "SAXParserFactory factory=SAXParserFactory.newInstance();" > > i get another error, probably related : > > Exception in thread "main" java.lang.NoClassDefFoundError : > > gnu.xml.stream.SAXParserFactory > > at javax.xml.parsers.SAXParserFactory.newInstance(Trs_Main.exe) > > > > im using jdk1.4.12 > > > > does this occur because JNC supports gnu's and not sun's SAX > implementation? > > please tell me what to do, do i have to use gnu's SAX in order to get it > > to work? > > and if so please tell me where to find it. > > Can you please provide two meaningful minimal examples for the described > two cases? I never got around to test XML myself, so that would be a > help... > > > Marco > > > Thank you. > > Steven > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > easier. > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > javaCompiler-users mailing list > > jav...@li... > > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > > public void trsToXml(String ofile) { SAXTransformerFactory factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); //the exception points to this line try{ FileWriter fw=new FileWriter(ofile); PrintWriter pw=new PrintWriter(fw,true); StreamResult stream=new StreamResult(pw); handler=factory.newTransformerHandler(); Transformer trans=handler.getTransformer(); trans.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1"); trans.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"trs_xml.dtd"); trans.setOutputProperty(OutputKeys.INDENT,"yes"); handler.setResult(stream); handler.startDocument(); AttributesImpl atts=new AttributesImpl(); handler.startElement("", "", "test", atts); atts.clear(); handler.startElement("", "", "foo", atts); handler.characters(new char[]{'a','b','c'}, 0, 3); handler.endElement("", "", "foo"); handler.endElement("", "", "test"); handler.endDocument(); pw.flush(); pw.close(); }catch(Exception _){_.printStackTrace();} this one throws the first exception } public void xmlToTrs(File sfile,String oFileName) { PrintWriter pWriter=null; try{ SAXParserFactory factory=SAXParserFactory.newInstance(); // the exception points to this line factory.setValidating(true); SAXParser parser=factory.newSAXParser(); boolean proceed=true; File trs=new File(oFileName); if(trs.isFile() && trs.exists()) { System.out.println("the file \""+oFileName+"\" already exists\nDo you wish to overwrite it ? Y/N\n"); BufferedReader input=new BufferedReader(new InputStreamReader(System.in )); proceed=input.readLine().equalsIgnoreCase("y"); } if(proceed) { parser.parse(sfile, new DefaultHandler()); pWriter=new PrintWriter(new FileWriter(trs),true); pWriter.write(sHeading.toString ()+sGeneral.toString()+sItems.toString()); pWriter.flush(); } } catch(Exception _){_.printStackTrace();} finally{if(pWriter!=null) pWriter.close();} } and this one the second -- |
From: Marco T. <mt...@gm...> - 2007-02-13 10:26:05
|
Steven Blade wrote: > hi > i have used JNC to compile a java app that does some xml parsing and > transformation. > my app references the javax.xml.parsers and javax.xml.transform, nothing > fancy in there. > it compiles fine but whenever i try to instantiate a > SAXTransformerFactory in my java code, i get the following error > (Trs_Main is the .exe) > Exception in thread "main" > javax.xml.transform.TransformerFactoryConfigurationError: > gnu.xml.transform.TransformerFactoryImpl > at java.lang.VMThrowable.fillInStackTrace(Trs_Main.exe) > at java.lang.Throwable .<init>(Trs_Main.exe) > at javax.xml.transform.TransformerFactory.newInstance(Trs_Main.exe) // i > guess this is where the error comes from > at asy.TrsToXML.split(Trs_Main.exe) > > also when i try to instantiate a SAXParserFactory object using > "SAXParserFactory factory=SAXParserFactory.newInstance();" > i get another error, probably related : > Exception in thread "main" java.lang.NoClassDefFoundError : > gnu.xml.stream.SAXParserFactory > at javax.xml.parsers.SAXParserFactory.newInstance(Trs_Main.exe) > > im using jdk1.4.12 > > does this occur because JNC supports gnu's and not sun's SAX implementation? > please tell me what to do, do i have to use gnu's SAX in order to get it > to work? > and if so please tell me where to find it. Can you please provide two meaningful minimal examples for the described two cases? I never got around to test XML myself, so that would be a help... Marco > Thank you. > Steven > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Steven B. <dud...@gm...> - 2007-02-13 10:02:03
|
hi i have used JNC to compile a java app that does some xml parsing and transformation. my app references the javax.xml.parsers and javax.xml.transform, nothing fancy in there. it compiles fine but whenever i try to instantiate a SAXTransformerFactory in my java code, i get the following error (Trs_Main is the .exe) Exception in thread "main" javax.xml.transform.TransformerFactoryConfigurationError: gnu.xml.transform.TransformerFactoryImpl at java.lang.VMThrowable.fillInStackTrace(Trs_Main.exe) at java.lang.Throwable.<init>(Trs_Main.exe) at javax.xml.transform.TransformerFactory.newInstance(Trs_Main.exe) // i guess this is where the error comes from at asy.TrsToXML.split(Trs_Main.exe) also when i try to instantiate a SAXParserFactory object using "SAXParserFactory factory=SAXParserFactory.newInstance();" i get another error, probably related : Exception in thread "main" java.lang.NoClassDefFoundError: gnu.xml.stream.SAXParserFactory at javax.xml.parsers.SAXParserFactory.newInstance(Trs_Main.exe) im using jdk1.4.12 does this occur because JNC supports gnu's and not sun's SAX implementation? please tell me what to do, do i have to use gnu's SAX in order to get it to work? and if so please tell me where to find it. Thank you. Steven |
From: Marco T. <mt...@gm...> - 2007-01-30 10:43:51
|
M. Bashir Al-Noimi wrote: > Marco Trudel wrote: > >> M. Bashir Al-Noimi wrote: >> >>> Hi there ;-) >>> >>> >>> Is there anybody can make a version of javaCompiler into eclipse >>> plug-in? >>> >> >> What would be the purpose? That Java applications can directly be >> compiled to native? >> > I think it's better to add an menu item as additional building option. Sure. Click on the "External tools" toolbar item, then "External tools..." and add AutoCompiler. Then you have your menu item (although it's in the toolbar). >> I think a eclipse plug-in would be like shooting a fly with a tank. Just >> create the complete project with the JNC gui and save a project file. >> Then run "AutoCompiler projectFile" as a custom command in eclipse... >> > Honestly, i couldn't understand you well! > what is *JNC*? did you mean *java native compiler*? Yes. Firstly my project was called "JavaCompiler". But that was a poor name. So I renamed it to "NativeJ" only to find out that this name was already taken by a similar product and this immediately lead to confusion. So I renamed it one last time to JNC (stands for JavaNativeCompiler). > what is *AutoCompiler projectFile*? AutoCompiler(.exe) is an application delivered with my GUI frontend. When you create a project in the GUI, you can save it to a project file and reuse it later. But you can also directly run a compilation from that project file by giving it to AutoCompiler.exe: > cd c:\path\to\JNC > AutoCompiler d:\path\to\the\project.jnc And it will compile it just as if you opened the project file in the GUI, pressed a couple of times next and then "compile". It's a Question in the FAQ after all... > I think it isn't practical to use javaCompiler with command line, Yes, you can't do that because it doesn't make sense... You just can automatically compile a project that you created. This way you can include native compilation into ant scripts, as eclipse command or whatever you wish... > cuz if > anybody want to use command line he can use gcj/gcc without needed to > javaCompiler! (i was using command line, but when i found javaCompiler > with its good GUI wizard i throw command line to the trash). No, it's not as easy as it sounds. Ever tried to create an archive out of a jar? Things like that and others are very complicated when trying to run them with GCJ manually. That's why I wrote my GUI. Marco |
From: M. B. Al-N. <ha...@ce...> - 2007-01-30 10:40:50
|
Marco Trudel wrote: > M. Bashir Al-Noimi wrote: > >> Hi there ;-) >> >> >> Is there anybody can make a version of javaCompiler into eclipse >> plug-in? >> > > What would be the purpose? That Java applications can directly be > compiled to native? > I think it's better to add an menu item as additional building option. > I think a eclipse plug-in would be like shooting a fly with a tank. Jus= t > create the complete project with the JNC gui and save a project file. > Then run "AutoCompiler projectFile" as a custom command in eclipse... > Honestly, i couldn't understand you well! what is *JNC*? did you mean *java native compiler*? what is *AutoCompiler projectFile*? I think it isn't practical to use javaCompiler with command line, cuz if anybody want to use command line he can use gcj/gcc without needed to javaCompiler! (i was using command line, but when i found javaCompiler with its good GUI wizard i throw command line to the trash). -- Best Regards =CA=CD=ED=C7=CA=ED Muhammad Bashir Al-Noimi =E3=CD=E3=CF =C8=D4=ED=D1 =C7=E1=E4=DA=ED=E3=ED My Blog =E3=CF=E6=E4=CA=ED http://www.hali-sy.com/blog |
From: M. B. Al-N. <ha...@ce...> - 2007-01-30 10:26:33
|
Marco Trudel wrote: > M. Bashir Al-Noimi wrote: > >> Hi there ;-) >> >> >> Is there anybody can make a version of javaCompiler into eclipse >> plug-in? >> > > What would be the purpose? That Java applications can directly be > compiled to native? > I think it's better to add an menu item as additional building option. > I think a eclipse plug-in would be like shooting a fly with a tank. Jus= t > create the complete project with the JNC gui and save a project file. > Then run "AutoCompiler projectFile" as a custom command in eclipse... > Honestly, i couldn't understand you well! what is *JNC*? did you mean *java native compiler*? what is *AutoCompiler projectFile*? I think it isn't practical to use javaCompiler with command line, cuz if anybody want to use command line he can use gcj/gcc without needed to javaCompiler! (i was using command line, but when i found javaCompiler with its good GUI wizard i throw command line to the trash). -- Best Regards =CA=CD=ED=C7=CA=ED Muhammad Bashir Al-Noimi =E3=CD=E3=CF =C8=D4=ED=D1 =C7=E1=E4=DA=ED=E3=ED My Blog =E3=CF=E6=E4=CA=ED http://www.hali-sy.com/blog |
From: Marco T. <mt...@gm...> - 2007-01-30 09:10:18
|
M. Bashir Al-Noimi wrote: > Hi there ;-) > > > Is there anybody can make a version of javaCompiler into eclipse > plug-in? What would be the purpose? That Java applications can directly be compiled to native? I think a eclipse plug-in would be like shooting a fly with a tank. Just create the complete project with the JNC gui and save a project file. Then run "AutoCompiler projectFile" as a custom command in eclipse... > sorry for rude asking, but i don't know about PDE, so i just suggest cuz > this suggestion discussed in mail-list of easyeclipse > <http://www.easyeclipse.org/>project, you can visit mail-list at this link: > > http://www.sourceforge.net/mailarchive/forum.php?forum=easyeclipse-user I would have been more interested in the actual thread since I don't want to go through all posts to see if I found the one you referred to :-( thanks Marco |
From: M. B. Al-N. <ha...@ce...> - 2007-01-30 05:12:25
|
Hi there ;-) Is there anybody can make a version of javaCompiler into eclipse plug-in? sorry for rude asking, but i don't know about PDE, so i just suggest cuz this suggestion discussed in mail-list of easyeclipse <http://www.easyeclipse.org/>project, you can visit mail-list at this lin= k: http://www.sourceforge.net/mailarchive/forum.php?forum=3Deasyeclipse-user -- Best Regards =CA=CD=ED=C7=CA=ED Muhammad Bashir Al-Noimi =E3=CD=E3=CF =C8=D4=ED=D1 =C7=E1=E4=DA=ED=E3=ED My Blog =E3=CF=E6=E4=CA=ED http://www.hali-sy.com/blog |
From: xxxxxxxxxxxxxxxxxxxx x. <hul...@ya...> - 2007-01-24 22:16:40
|
FYI: I somehow had a libgcj jar in my classpath ... not exactly the thing you'd expect there! I'll think about switching to swt. Peter Marco Trudel <mt...@gm...> wrote: xxxxxxxxxxxxxxxxxxxx xxxxxxxxxx wrote: > Hey Marco, > > solved the problem!! A few weeks ago I was messing with my cygwin > install to get something working. I managed to do what I wanted to do, > but as part of what I did I put a library file into the classpath (this > time classpath is right!). That's what did the screwing up!! Removed it > from the classpath now and jnc seems to work fine now. I could start the > GUI and my manually compiled helloWorld app worked fine as well. So I > reckon that's all of my problems solved. Can you explain that a little bit more? What file has it been? I'm surprised that one lib can stop GCC compiled apps from working... As long as it's not a Windows core dll, it really shouldn't have any impact... > I'm working on an image-transforming app right now, so having a swing > compatible native compiler like jnc is really useful. Before that I was > mainly programming mathematical apps for research groups etc, so never > had to deal with swing - mathematicians don't like pretty windows! :-) Well, If you have the choice, I suggest to use SWT instead of Swing. It's faster, looks better, has better native compilation support and creates way smaller binaries... > Thanks for providing help on this one. > And good work on jnc - keep it up Thanks and you're welcome... Marco --------------------------------- Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. |
From: Marco T. <mt...@gm...> - 2007-01-17 10:02:12
|
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxx wrote: > Hey Marco, > > solved the problem!! A few weeks ago I was messing with my cygwin > install to get something working. I managed to do what I wanted to do, > but as part of what I did I put a library file into the classpath (this > time classpath is right!). That's what did the screwing up!! Removed it > from the classpath now and jnc seems to work fine now. I could start the > GUI and my manually compiled helloWorld app worked fine as well. So I > reckon that's all of my problems solved. Can you explain that a little bit more? What file has it been? I'm surprised that one lib can stop GCC compiled apps from working... As long as it's not a Windows core dll, it really shouldn't have any impact... > I'm working on an image-transforming app right now, so having a swing > compatible native compiler like jnc is really useful. Before that I was > mainly programming mathematical apps for research groups etc, so never > had to deal with swing - mathematicians don't like pretty windows! :-) Well, If you have the choice, I suggest to use SWT instead of Swing. It's faster, looks better, has better native compilation support and creates way smaller binaries... > Thanks for providing help on this one. > And good work on jnc - keep it up Thanks and you're welcome... Marco |
From: xxxxxxxxxxxxxxxxxxxx x. <hul...@ya...> - 2007-01-16 22:37:12
|
Hey Marco, solved the problem!! A few weeks ago I was messing with my cygwin install to get something working. I managed to do what I wanted to do, but as part of what I did I put a library file into the classpath (this time classpath is right!). That's what did the screwing up!! Removed it from the classpath now and jnc seems to work fine now. I could start the GUI and my manually compiled helloWorld app worked fine as well. So I reckon that's all of my problems solved. I'm working on an image-transforming app right now, so having a swing compatible native compiler like jnc is really useful. Before that I was mainly programming mathematical apps for research groups etc, so never had to deal with swing - mathematicians don't like pretty windows! Thanks for providing help on this one. And good work on jnc - keep it up All the Best Peter Marco Trudel <mt...@gm...> wrote: Hey Peter Can you please hit "Reply all"? Else we loose the mailing list. xxxxxxxxxxxxxxxxxxxx xxxxxxxxxx wrote: > Ok, did the manual compiling of a HelloWorld program and presto: > > All of the compiling seems to work fine, but when I then want to run my > HelloWorld app I get the same error I get when I try to start the > AutoCompiler: > > "Exception during runtime initialisation > > This application has requested the runtime to terminate it in an unusual > way. > Please contact the application's support team for more information" Stupid! How did you compile? Did you enable optimization? Stripping? Adding debug info? Can you try a couple of different compilations? How much knowledge do you have with gcc and alike? Do you know how to add debuging information and run it in gdb? > So, for some reason my computer doesn't like files that have been > compiled with that jnc gcj.exe. Have you tried your compiled exe on another computer? > I was wondering whether my computer just starts loosing it, but if I > compile the same Hello World source code with my standard > cygwin-in-built gcj, everything works fine. Well, my gcj is built for mingw, but that really doesn't make a difference. Because it works on hundred of other computers (probably a lot of XP Homes), I assume it has something to do with your computer. What version is the cygwin gcj? > So, it is actually something about the jnc gcj.exe ...... can't really > think of something that my computer could do to "break" the jnc gcj > ..... any ideas? Hm. A compiled binary on windows uses ADVAPI32.dll, KERNEL32.dll, msvcrt.dll, USER32.dll and WS2_32.dll. Maybe you screwed one of these up? I really can't say anything better than to try on another computer. Sorry... Marco --------------------------------- Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. |
From: Marco T. <mt...@gm...> - 2007-01-16 17:40:48
|
Hey Peter Can you please hit "Reply all"? Else we loose the mailing list. xxxxxxxxxxxxxxxxxxxx xxxxxxxxxx wrote: > Ok, did the manual compiling of a HelloWorld program and presto: > > All of the compiling seems to work fine, but when I then want to run my > HelloWorld app I get the same error I get when I try to start the > AutoCompiler: > > "Exception during runtime initialisation > > This application has requested the runtime to terminate it in an unusual > way. > Please contact the application's support team for more information" Stupid! How did you compile? Did you enable optimization? Stripping? Adding debug info? Can you try a couple of different compilations? How much knowledge do you have with gcc and alike? Do you know how to add debuging information and run it in gdb? > So, for some reason my computer doesn't like files that have been > compiled with that jnc gcj.exe. Have you tried your compiled exe on another computer? > I was wondering whether my computer just starts loosing it, but if I > compile the same Hello World source code with my standard > cygwin-in-built gcj, everything works fine. Well, my gcj is built for mingw, but that really doesn't make a difference. Because it works on hundred of other computers (probably a lot of XP Homes), I assume it has something to do with your computer. What version is the cygwin gcj? > So, it is actually something about the jnc gcj.exe ...... can't really > think of something that my computer could do to "break" the jnc gcj > ..... any ideas? Hm. A compiled binary on windows uses ADVAPI32.dll, KERNEL32.dll, msvcrt.dll, USER32.dll and WS2_32.dll. Maybe you screwed one of these up? I really can't say anything better than to try on another computer. Sorry... Marco |
From: Marco T. <mt...@gm...> - 2007-01-16 16:36:48
|
xxxxxxxxxxxxxxxxxxxx xxxxxxxxxx wrote: > Hi, > > thanks for the quick answer. > I'm pretty sure that the problem I've got is to do with the GUI > frontend. The compiler binaries all seem to work (did a few manual test > compilations). Great, someone who knows what he's doing. That will make it easier :-) The GUI frontend and AutoCompiler are both written in Java and compiled with JNC (GCJ) itself. So can you please compile a simple "Hello World" application with the provided GCJ and see if that runs on your computer? You have to add "-ljncTrial", else you will get a license error. > The problem is that the GUI just won't appear when I try to start the > JavaNativeCompiler nor will I get any sort of feedback at all. Yes, thats because the console is suppressed. You can run "AutoCompiler -debug", that will start the GUI and keep the console open. But because AutoCompiler itself doesn't work on your computer, that's not much of use and leaves us with working with AutoCompiler since there we see the output. > I'm using Windows XP Home. Can you try it on another computer? I tested a lot of Windows XP Professional and Home and had never problems. Someone once had a problem with the GUI, but AutoCompiler worked. We then decided that his computer was somehow screwed up since all others he had worked. So, something really has to be special on your computer... > Apart from the obvious double-clicking on it, I also tried to get it to > go via the standard windows command/cygwin bash shells, so I haven't > tried any fancy workarounds yet. Not needed. Doubleclicking really should be enough. > (whether I just download the GUI > frontend or also unpack the compilers into right directory doesn't make > any difference to that) Yes, doesn't matter. The compilers are only needed in the final step. > As for the AutoCompiler: When I start it via a shell (otherwise I just > get a shell that pops up and immediately disappears), I get the > following message: > " > Exception during runtime initialisation > > This application has requested the runtime to terminate it in an unusual > way. > Please contact the application's support team for more information > " Very very strange. I never heard that and you're the first of thousands of users reporting something like that. So I can't debug it because I can't duplicate it... I think we're best off with you trying to compile something manually to see if that works... > Once I get the GUI to work, I reckon the rest should take care of > itself. I could probably just use the compilers manually, but I might > get conflicting CLASSPATH problems if I keep my standard gcj etc. in > there as well, which I would quite like to. I assume you mean "PATH" ;-) Yes, there you would probably get into trouble. A really ugly workaround would be to always call it absolutely. But using the GUI is definitely the better idea since a couple of special flags are required depending on what you do. Please try a very minimalistic Java application. If that runs, it becomes even more strange. I'm interested in your feedback... Marco |