javacompiler-users Mailing List for javaCompiler (Page 2)
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: Marco T. <ma...@mt...> - 2009-11-28 11:59:02
|
Dear Keith It would of course be better to resolve the multiple definitions (shouldn't be too hard, just remove them from the jaxen jar), but you can also do it with the gcc flag as you have tried. What you're looking for is -Wl,--allow-multiple-definition It's a linker option, so "-Wl" is needed so that gcc/gcj knows it has to pass the "--allow-multiple-definition" to the linker. Hope that helps Marco Keith Boynton schrieb: > Hi again Marco, > > The journey continues.... > > Further down the road and I discover I need to plug Jaxen in and I come > across the dreaded multiple definition errors. Other than pulling them > out of jaxen.jar I read this.... > > "I'm pretty sure the solution was to use -fenable-multiple-definitions or > so... Please check the mailing list archive... > Marco" > > On further investigation, I cannot see that > "enable-multiple-definitions" is correct. However, GCJ does have a flag > "--allow-multiple-definition". > > Problem is adding "--allow-multiple-definition" as a custom GCJ flag > gives the following error: > cc1.exe: error: unrecognized command line option > "-fallow-multiple-definition" > > What should I be adding in the Custom GCJ flags section to set this flag? > > Keith |
From: Keith B. <kei...@fl...> - 2009-11-27 20:45:07
|
Hi again Marco, The journey continues.... Further down the road and I discover I need to plug Jaxen in and I come across the dreaded multiple definition errors. Other than pulling them out of jaxen.jar I read this.... "I'm pretty sure the solution was to use -fenable-multiple-definitions or so... Please check the mailing list archive... Marco" On further investigation, I cannot see that "enable-multiple-definitions" is correct. However, GCJ does have a flag "--allow-multiple-definition". Problem is adding "--allow-multiple-definition" as a custom GCJ flag gives the following error: cc1.exe: error: unrecognized command line option "-fallow-multiple-definition" What should I be adding in the Custom GCJ flags section to set this flag? Keith |
From: Keith B. <kei...@fl...> - 2009-11-26 20:53:48
|
Bingo! Marco, you are a diamond, so far so good..... I haven't yet performed extensive testing so I'm sure there will be some further issues but it is executing successfully now. Incidentally I think part of the solution was that I had it caching the compiled jars, I switched that off and removed the old object files so everything was recompiled. I was also confused about the custom GCJ option and had been searching for a -switch. When, of course you specify it just like a .o file with no switch! For the record (as I know how frustrating it can be to find a thread and it not end in a solution) here are the settings that are now working (so far). All jars are the same as before, all checked so they are fully compiled. Use CNI is now not checked. Omit packing is now checked. Custom GCJ Flags: c:\temp\templib\* and -findirect-dispatch Don't cache compiled jars is now checked I'm having problems getting the XML to validate against the schema (or rather for the parser to find the .xsd) but there are no exceptions getting thrown and it's executing. Appreciate your time Marco! Keith |
From: Marco T. <ma...@mt...> - 2009-11-26 08:56:23
|
Dear Keith Keith Boynton wrote: > Hi Marco, > > I think I may be making "some" progress and I have a feeling this may be > the thread you are talking about: > http://sourceforge.net/mailarchive/forum.php?thread_name=46E7A0BF.2060301%40gmx.ch&forum_name=javacompiler-users > > > More specifically I'm guessing this part of the thread is what could > well be relevant: > > "lets just try to manually include all xml objects into the binary: > > 1. create a temporary folder. e.g. d:\test > 2. open "cmd" and change into that folder > 3. extract all objects from libgcj.a (run in cmd): > path_to\gcc-122233-win\bin\ar.exe x path_to\gcc-122233-win\lib\libgcj.a > 4. Delete all extracted files that have no "xml" in the name (you know > how to do that automatically, right?) > 5. Now remove the two files I sent you before and instead, in step 3 in > the GUI, add the directory: d:\test\* > > With this procedure, you've the complete XML support in your binary. If > everything works, you might want to try to remove some of the objects > (if the application still works without them, they're not needed)..." Exactly what I was talking about. > Now, no matter what I do it doesn't seem to increase the size of the > binary (and I get the same error), so I'm guessing I'm doing something > wrong to get them added. > > I performed steps 1, 2 and 3 no problem. I skipped step 4 for now. Yep, that's what I would have suggested (skipping step 4 for now). > I've tried step 5 although as I say it didn't increase the size of the > binary so I'm assuming nothing extra made it into the binary. > > One thing I did notice is that your instructions suggest adding the > directory "d:\test\*" however, adding \* seems to be impossible using > your GUI as the directory browsing dialog simply removes it. If it > navigate to the said directory using the dialog and then manually add > the \* (or /*) it simply get's removed. It has to be added as custom GCJ option, not as source directory. > Another interesting note is that, if I add the options as custom GCJ > options like; org.xml.sax.driver.o it simply fails with cannot find > file. Well, it's GCJ. It doesn't know what to do with org.xml.sax.driver.o. Of course you have to specify the directory. > But if I add the option as c:\temp\templib\org.xml.sax.driver.o it > doesn't complain but nothing seems to be added to the binary. As said in Step 5, please add "C:\temp\templib\*" so you're sure all libgcj object will be included. This should result in a way bigger executable. Also you can check the compilation output to see if the flag was used. > I feel I'm really close but either something is wrong or I'm missing > something fundamental. > > I'm using your latest GUI with GCC downloaded from your site. > > Here's the GUI settings that may be relevant: > > Step 1 > Files: None > Directories: c:\temp\templib > Archives: filesquirrel.jar, flaresdk.jar, smtp.jar, dsn.jar, > log4j-1.2.13.jar, dom4j-1.6.1.jar, commons-io.1.2.jar, mailapi.jar, > pop3.jar, imap.jar. (All with checkbox ticked for complete compilation). > > Step 2 > Main class: com.flare.applications.FileSquirrel.App > java.library.path: None > Use CNI: Ticked Why? Don't tick that unless you really know what you're doing. > Omit stripping, omit packing, disable optimization all not ticked I would omit packing for now, it only takes a lot of time. > Step 3 > Custom GCJ Flags > C:\temp\templib\javax.xml.parsers.DocumentBuilderFactory.o > C:\temp\templib\javax.xml.parsers.SAXParserFactory.o > C:\temp\templib\javax.xml.parsers.TransformerFactory.o > C:\temp\templib\org.relaxng.datatype.DatatypeLibraryFactory.o > C:\temp\templib\org.xml.sax.driver.o > -findirect-dispatch Well, adding indirect-dispatch can lead to objects not included. There might be the source of the problem. But I guess you need it because of all the Jar archives you're using. > Exclude GUI, Exclude JCE, Add GNU regex all ticked Untick them all for testing purposes now. Otherwise you get mutliple references errors. Hope that helps Marco > Compilation and packing executes just fine, however I still get the > Caused by: java.lang.ClassNotFoundException: org.xml.sax.EntityResolver > not found exception. > > Obviously I'm still fighting it, but any pointers would be greatly > appreciated. > > Keith |
From: Keith B. <kei...@fl...> - 2009-11-26 08:45:40
|
Hi Marco, I think I may be making "some" progress and I have a feeling this may be the thread you are talking about: http://sourceforge.net/mailarchive/forum.php?thread_name=46E7A0BF.2060301%40gmx.ch&forum_name=javacompiler-users More specifically I'm guessing this part of the thread is what could well be relevant: "lets just try to manually include all xml objects into the binary: 1. create a temporary folder. e.g. d:\test 2. open "cmd" and change into that folder 3. extract all objects from libgcj.a (run in cmd): path_to\gcc-122233-win\bin\ar.exe x path_to\gcc-122233-win\lib\libgcj.a 4. Delete all extracted files that have no "xml" in the name (you know how to do that automatically, right?) 5. Now remove the two files I sent you before and instead, in step 3 in the GUI, add the directory: d:\test\* With this procedure, you've the complete XML support in your binary. If everything works, you might want to try to remove some of the objects (if the application still works without them, they're not needed)..." Now, no matter what I do it doesn't seem to increase the size of the binary (and I get the same error), so I'm guessing I'm doing something wrong to get them added. I performed steps 1, 2 and 3 no problem. I skipped step 4 for now. I've tried step 5 although as I say it didn't increase the size of the binary so I'm assuming nothing extra made it into the binary. One thing I did notice is that your instructions suggest adding the directory "d:\test\*" however, adding \* seems to be impossible using your GUI as the directory browsing dialog simply removes it. If it navigate to the said directory using the dialog and then manually add the \* (or /*) it simply get's removed. Another interesting note is that, if I add the options as custom GCJ options like; org.xml.sax.driver.o it simply fails with cannot find file. But if I add the option as c:\temp\templib\org.xml.sax.driver.o it doesn't complain but nothing seems to be added to the binary. I feel I'm really close but either something is wrong or I'm missing something fundamental. I'm using your latest GUI with GCC downloaded from your site. Here's the GUI settings that may be relevant: Step 1 Files: None Directories: c:\temp\templib Archives: filesquirrel.jar, flaresdk.jar, smtp.jar, dsn.jar, log4j-1.2.13.jar, dom4j-1.6.1.jar, commons-io.1.2.jar, mailapi.jar, pop3.jar, imap.jar. (All with checkbox ticked for complete compilation). Step 2 Main class: com.flare.applications.FileSquirrel.App java.library.path: None Use CNI: Ticked Omit stripping, omit packing, disable optimization all not ticked Step 3 Custom GCJ Flags C:\temp\templib\javax.xml.parsers.DocumentBuilderFactory.o C:\temp\templib\javax.xml.parsers.SAXParserFactory.o C:\temp\templib\javax.xml.parsers.TransformerFactory.o C:\temp\templib\org.relaxng.datatype.DatatypeLibraryFactory.o C:\temp\templib\org.xml.sax.driver.o -findirect-dispatch Exclude GUI, Exclude JCE, Add GNU regex all ticked Compilation and packing executes just fine, however I still get the Caused by: java.lang.ClassNotFoundException: org.xml.sax.EntityResolver not found exception. Obviously I'm still fighting it, but any pointers would be greatly appreciated. Keith |
From: Marco T. <ma...@mt...> - 2009-11-23 09:09:03
|
Dear Keith Keith Boynton wrote: > Hi Marco, > > Thanks for your very speedy response. > > "Please read the manual. Especially the last part of step 1. This might > already do the job" > I do apologise, I should have specified in my original history that I have > already tried the static {} references suggestion from the manual. > Unfortunately that isn't making a difference. I see... > "If not, please read through the mail archive. There were some discussions > about parts of libgcj not getting into the binary and how to solve it" > I'll have a deeper search through the archives, great news that there is > already a discussion about it. I didn't find it on my first attempts. Actually I quickly searched the archive myself but didn't find it... But I know there are discussions about it ;-) > "I wonder why people always try setting the classpath. This has nothing to > do with native compilation" > Is there not situations where this would be helpful (if indeed it does > work)? I can think of an app I would like to develop but wouldn't get a > license to distribute some of the jar dependencies and also wouldn't be > allowed to compile them into my app. Well, interesting thought. I actually never even tried if something like this works. I assume you would need to ship some parts of gcj with the binary, but I have no clue... My goal was always to get one whole binary... Have a nice day Marco > Thanks again Marco for your responses, hopefully I'll find what I need in > the archives! > > Keith > > -------------------------------------------------- > From: "Marco Trudel" <ma...@mt...> > Sent: Sunday, November 22, 2009 7:43 PM > To: "Keith Boynton" <kei...@fl...> > Cc: <jav...@li...> > Subject: Re: [jnc-users] Null PointerException > atjava.net.URLClassLoader.getPermissions > >> Dear Keith >> >> Keith Boynton wrote: >>> Hi, >>> >>> I made some good progress compiling an app I've written, I came across a >>> few errors during the first few iterations of compilation. I've been >>> able to resolve most problems I came across by adding missing >>> dependencies (jar files) for various packages I'm using. >>> >>> However I've come to a particular problem that I'm really stumped with >>> and would appreciate any help anyone could offer. >>> >>> I've compiled my app using normal methods through the UI and compilation >>> and packing seems successful. However when I run the app (windows or >>> linux, both behave the same and return the same errors) I was initially >>> getting this error: >>> >>> [root@tserver tmp]# ./linux >>> Exception in thread "main" java.lang.NoClassDefFoundError: >>> org.apache.log4j.xml.DOMConfigurator >>> at java.lang.Class.initializeClass(linux) >>> at java.lang.Class.newInstance(linux) >>> at >>> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) >>> at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) >>> at org.apache.log4j.LogManager.<clinit>(linux) >>> at java.lang.Class.initializeClass(linux) >>> at org.apache.log4j.LogManager.getLogger(linux) >>> at org.apache.log4j.Logger.getLogger(linux) >>> at com.flare.applications.FileSquirrel.App.main(linux) >>> Caused by: java.lang.ClassNotFoundException: org.xml.sax.ErrorHandler >> Please read the manual. Especially the last part of step 1. >> This might already do the job: >> static >> { >> org.xml.sax.ErrorHandler.class.getName(); >> } > > I do apologise, I should have specified in my original history that I have > already tried the static {} references suggestion from the manual. > Unfortunately that isn't making a difference. > > >> If not, please read through the mail archive. There were some >> discussions about parts of libgcj not getting into the binary and how to >> solve it (ar x libgcj and adding the objects to the compilation). >> >>> not found in gnu.gcj.runtime.SystemClassLoader{urls=[], >>> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} >>> at java.net.URLClassLoader.findClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at gnu.gcj.runtime.SystemClassLoader.findClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at java.lang.Class.initializeClass(linux) >>> ...8 more >>> I added the libgcj jar to the classpath: >>> export CLASSPATH=/tmp/libgcj-4.3.0.jar >> You try to native compile something. So you want to get a binary from >> your application, not some links to a runtime lying somewhere... >> I wonder why people always try setting the classpath. This has nothing >> to do with native compilation... It's too bad GCJ also is a VM and this >> has an effect even if GCJ is used for native compilation. >> >> >> Hope this helps >> Marco >> >> >>> And now I'm getting this error: >>> >>> [root@tserver tmp]# ./linux >>> Exception in thread "main" java.lang.NoClassDefFoundError: >>> org.apache.log4j.xml.DOMConfigurator >>> at java.lang.Class.initializeClass(linux) >>> at java.lang.Class.newInstance(linux) >>> at >>> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) >>> at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) >>> at org.apache.log4j.LogManager.<clinit>(linux) >>> at java.lang.Class.initializeClass(linux) >>> at org.apache.log4j.LogManager.getLogger(linux) >>> at org.apache.log4j.Logger.getLogger(linux) >>> at com.flare.applications.FileSquirrel.App.main(linux) >>> Caused by: java.lang.NullPointerException >>> at java.net.URLClassLoader.getPermissions(linux) >>> at java.security.SecureClassLoader.getProtectionDomain(linux) >>> at java.security.SecureClassLoader.defineClass(linux) >>> at java.net.URLClassLoader.findClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at gnu.gcj.runtime.SystemClassLoader.findClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at java.lang.ClassLoader.loadClass(linux) >>> at java.lang.Class.initializeClass(linux) >>> ...8 more >>> This has me really stumped and any help would be greatly appreciated. >>> >>> Keith >>> >>> >>> ------------------------------------------------------------------------ >>> >>> ------------------------------------------------------------------------------ >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >>> 30-Day >>> trial. Simplify your report design, integration and deployment - and >>> focus on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> javaCompiler-users mailing list >>> jav...@li... >>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users >> >> > > > >> No virus found in this incoming message. >> Checked by AVG - www.avg.com >> Version: 8.5.425 / Virus Database: 270.14.76/2519 - Release Date: 11/22/09 >> 07:38:00 >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Keith B. <kei...@fl...> - 2009-11-23 09:02:11
|
Hi Marco, Thanks for your very speedy response. "Please read the manual. Especially the last part of step 1. This might already do the job" I do apologise, I should have specified in my original history that I have already tried the static {} references suggestion from the manual. Unfortunately that isn't making a difference. "If not, please read through the mail archive. There were some discussions about parts of libgcj not getting into the binary and how to solve it" I'll have a deeper search through the archives, great news that there is already a discussion about it. I didn't find it on my first attempts. "I wonder why people always try setting the classpath. This has nothing to do with native compilation" Is there not situations where this would be helpful (if indeed it does work)? I can think of an app I would like to develop but wouldn't get a license to distribute some of the jar dependencies and also wouldn't be allowed to compile them into my app. Thanks again Marco for your responses, hopefully I'll find what I need in the archives! Keith -------------------------------------------------- From: "Marco Trudel" <ma...@mt...> Sent: Sunday, November 22, 2009 7:43 PM To: "Keith Boynton" <kei...@fl...> Cc: <jav...@li...> Subject: Re: [jnc-users] Null PointerException atjava.net.URLClassLoader.getPermissions > Dear Keith > > Keith Boynton wrote: >> Hi, >> >> I made some good progress compiling an app I've written, I came across a >> few errors during the first few iterations of compilation. I've been >> able to resolve most problems I came across by adding missing >> dependencies (jar files) for various packages I'm using. >> >> However I've come to a particular problem that I'm really stumped with >> and would appreciate any help anyone could offer. >> >> I've compiled my app using normal methods through the UI and compilation >> and packing seems successful. However when I run the app (windows or >> linux, both behave the same and return the same errors) I was initially >> getting this error: >> >> [root@tserver tmp]# ./linux >> Exception in thread "main" java.lang.NoClassDefFoundError: >> org.apache.log4j.xml.DOMConfigurator >> at java.lang.Class.initializeClass(linux) >> at java.lang.Class.newInstance(linux) >> at >> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) >> at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) >> at org.apache.log4j.LogManager.<clinit>(linux) >> at java.lang.Class.initializeClass(linux) >> at org.apache.log4j.LogManager.getLogger(linux) >> at org.apache.log4j.Logger.getLogger(linux) >> at com.flare.applications.FileSquirrel.App.main(linux) >> Caused by: java.lang.ClassNotFoundException: org.xml.sax.ErrorHandler > > Please read the manual. Especially the last part of step 1. > This might already do the job: > static > { > org.xml.sax.ErrorHandler.class.getName(); > } I do apologise, I should have specified in my original history that I have already tried the static {} references suggestion from the manual. Unfortunately that isn't making a difference. > If not, please read through the mail archive. There were some > discussions about parts of libgcj not getting into the binary and how to > solve it (ar x libgcj and adding the objects to the compilation). > >> not found in gnu.gcj.runtime.SystemClassLoader{urls=[], >> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} >> at java.net.URLClassLoader.findClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at gnu.gcj.runtime.SystemClassLoader.findClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at java.lang.Class.initializeClass(linux) >> ...8 more >> I added the libgcj jar to the classpath: >> export CLASSPATH=/tmp/libgcj-4.3.0.jar > > You try to native compile something. So you want to get a binary from > your application, not some links to a runtime lying somewhere... > I wonder why people always try setting the classpath. This has nothing > to do with native compilation... It's too bad GCJ also is a VM and this > has an effect even if GCJ is used for native compilation. > > > Hope this helps > Marco > > >> And now I'm getting this error: >> >> [root@tserver tmp]# ./linux >> Exception in thread "main" java.lang.NoClassDefFoundError: >> org.apache.log4j.xml.DOMConfigurator >> at java.lang.Class.initializeClass(linux) >> at java.lang.Class.newInstance(linux) >> at >> org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) >> at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) >> at org.apache.log4j.LogManager.<clinit>(linux) >> at java.lang.Class.initializeClass(linux) >> at org.apache.log4j.LogManager.getLogger(linux) >> at org.apache.log4j.Logger.getLogger(linux) >> at com.flare.applications.FileSquirrel.App.main(linux) >> Caused by: java.lang.NullPointerException >> at java.net.URLClassLoader.getPermissions(linux) >> at java.security.SecureClassLoader.getProtectionDomain(linux) >> at java.security.SecureClassLoader.defineClass(linux) >> at java.net.URLClassLoader.findClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at gnu.gcj.runtime.SystemClassLoader.findClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at java.lang.ClassLoader.loadClass(linux) >> at java.lang.Class.initializeClass(linux) >> ...8 more >> This has me really stumped and any help would be greatly appreciated. >> >> Keith >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day >> trial. Simplify your report design, integration and deployment - and >> focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> javaCompiler-users mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.425 / Virus Database: 270.14.76/2519 - Release Date: 11/22/09 > 07:38:00 > |
From: Marco T. <ma...@mt...> - 2009-11-22 20:10:17
|
Dear Keith Keith Boynton wrote: > Hi, > > I made some good progress compiling an app I've written, I came across a > few errors during the first few iterations of compilation. I've been > able to resolve most problems I came across by adding missing > dependencies (jar files) for various packages I'm using. > > However I've come to a particular problem that I'm really stumped with > and would appreciate any help anyone could offer. > > I've compiled my app using normal methods through the UI and compilation > and packing seems successful. However when I run the app (windows or > linux, both behave the same and return the same errors) I was initially > getting this error: > > [root@tserver tmp]# ./linux > Exception in thread "main" java.lang.NoClassDefFoundError: > org.apache.log4j.xml.DOMConfigurator > at java.lang.Class.initializeClass(linux) > at java.lang.Class.newInstance(linux) > at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) > at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) > at org.apache.log4j.LogManager.<clinit>(linux) > at java.lang.Class.initializeClass(linux) > at org.apache.log4j.LogManager.getLogger(linux) > at org.apache.log4j.Logger.getLogger(linux) > at com.flare.applications.FileSquirrel.App.main(linux) > Caused by: java.lang.ClassNotFoundException: org.xml.sax.ErrorHandler Please read the manual. Especially the last part of step 1. This might already do the job: static { org.xml.sax.ErrorHandler.class.getName(); } If not, please read through the mail archive. There were some discussions about parts of libgcj not getting into the binary and how to solve it (ar x libgcj and adding the objects to the compilation). > not found in gnu.gcj.runtime.SystemClassLoader{urls=[], > parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} > at java.net.URLClassLoader.findClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at gnu.gcj.runtime.SystemClassLoader.findClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at java.lang.Class.initializeClass(linux) > ...8 more > I added the libgcj jar to the classpath: > export CLASSPATH=/tmp/libgcj-4.3.0.jar You try to native compile something. So you want to get a binary from your application, not some links to a runtime lying somewhere... I wonder why people always try setting the classpath. This has nothing to do with native compilation... It's too bad GCJ also is a VM and this has an effect even if GCJ is used for native compilation. Hope this helps Marco > And now I'm getting this error: > > [root@tserver tmp]# ./linux > Exception in thread "main" java.lang.NoClassDefFoundError: > org.apache.log4j.xml.DOMConfigurator > at java.lang.Class.initializeClass(linux) > at java.lang.Class.newInstance(linux) > at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) > at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) > at org.apache.log4j.LogManager.<clinit>(linux) > at java.lang.Class.initializeClass(linux) > at org.apache.log4j.LogManager.getLogger(linux) > at org.apache.log4j.Logger.getLogger(linux) > at com.flare.applications.FileSquirrel.App.main(linux) > Caused by: java.lang.NullPointerException > at java.net.URLClassLoader.getPermissions(linux) > at java.security.SecureClassLoader.getProtectionDomain(linux) > at java.security.SecureClassLoader.defineClass(linux) > at java.net.URLClassLoader.findClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at gnu.gcj.runtime.SystemClassLoader.findClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at java.lang.ClassLoader.loadClass(linux) > at java.lang.Class.initializeClass(linux) > ...8 more > This has me really stumped and any help would be greatly appreciated. > > Keith > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Keith B. <kei...@fl...> - 2009-11-22 15:36:11
|
Hi, I made some good progress compiling an app I've written, I came across a few errors during the first few iterations of compilation. I've been able to resolve most problems I came across by adding missing dependencies (jar files) for various packages I'm using. However I've come to a particular problem that I'm really stumped with and would appreciate any help anyone could offer. I've compiled my app using normal methods through the UI and compilation and packing seems successful. However when I run the app (windows or linux, both behave the same and return the same errors) I was initially getting this error: [root@tserver tmp]# ./linux Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.log4j.xml.DOMConfigurator at java.lang.Class.initializeClass(linux) at java.lang.Class.newInstance(linux) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) at org.apache.log4j.LogManager.<clinit>(linux) at java.lang.Class.initializeClass(linux) at org.apache.log4j.LogManager.getLogger(linux) at org.apache.log4j.Logger.getLogger(linux) at com.flare.applications.FileSquirrel.App.main(linux) Caused by: java.lang.ClassNotFoundException: org.xml.sax.ErrorHandler not found in gnu.gcj.runtime.SystemClassLoader{urls=[], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}} at java.net.URLClassLoader.findClass(linux) at java.lang.ClassLoader.loadClass(linux) at java.lang.ClassLoader.loadClass(linux) at gnu.gcj.runtime.SystemClassLoader.findClass(linux) at java.lang.ClassLoader.loadClass(linux) at java.lang.ClassLoader.loadClass(linux) at java.lang.Class.initializeClass(linux) ...8 more I added the libgcj jar to the classpath: export CLASSPATH=/tmp/libgcj-4.3.0.jar And now I'm getting this error: [root@tserver tmp]# ./linux Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.log4j.xml.DOMConfigurator at java.lang.Class.initializeClass(linux) at java.lang.Class.newInstance(linux) at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(linux) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(linux) at org.apache.log4j.LogManager.<clinit>(linux) at java.lang.Class.initializeClass(linux) at org.apache.log4j.LogManager.getLogger(linux) at org.apache.log4j.Logger.getLogger(linux) at com.flare.applications.FileSquirrel.App.main(linux) Caused by: java.lang.NullPointerException at java.net.URLClassLoader.getPermissions(linux) at java.security.SecureClassLoader.getProtectionDomain(linux) at java.security.SecureClassLoader.defineClass(linux) at java.net.URLClassLoader.findClass(linux) at java.lang.ClassLoader.loadClass(linux) at java.lang.ClassLoader.loadClass(linux) at gnu.gcj.runtime.SystemClassLoader.findClass(linux) at java.lang.ClassLoader.loadClass(linux) at java.lang.ClassLoader.loadClass(linux) at java.lang.Class.initializeClass(linux) ...8 more This has me really stumped and any help would be greatly appreciated. Keith |
From: Marco T. <ma...@mt...> - 2009-07-05 19:41:40
|
Dear Max You need the dll from your SWT bundle, not from mine. It's in the swt.jar. It's just coincidence that the JNC gui is also written in SWT... SWT checks at runtime if the dlls are in java.library.path. If not, they're extracted from the jar to the system temporary path and used from there. This seems to fail with the JNC compiled binary; thus it asks for the dll. Hope that helps (and therefore you at least once didn't fail in live ;-)) Marco Maximilian Eberl wrote: > Hello and Gruezi Marco! > > First: Thank You a lot for Your work. I struggled a few days through gcj and failed (like I always do in my life ...) but prefer now to pay You for Your pain. Chapeau! > > Now the problem: > > I downloaded 1.1.1 and wrote a standard Hello-App named Wuff.java (I am a dog owner), included swt.jar in the project, added command line flags "--classpath=C:\jnc\swt.jar" (checked) and "-findirect-dispatch", excluded GUI and JCE packages (by the way: java.text contains the often-used SimpleDateFormat and DecimalFormat - better leave it in the core jar!!!!) and compiled it successfully. > > Starting it on the Dos-Box told me: > > C:\jnc>Wuff > Exception in thread "main" java.lang.UnsatisfiedLinkError: swt-win32-3218: can' > ... > > So I copied the > swt-win-32-3235.dll > enclosed in Your download into the directory of Wuff.exe > > It failed again, so I looked closer to the error message and detected, that it was expecting ..3218.dll, not 3225. > > Renaming did the job an the dog barked. > > Would You please take a look to the different expected versions? Maybe 3225 contains a few sexy features more than 3118. Or is only the message outdated (Copy&Paste)? > > Greetings from Speyer > > Maximilian Eberl > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Maximilian E. <max...@ya...> - 2009-07-05 18:06:10
|
Hello and Gruezi Marco! First: Thank You a lot for Your work. I struggled a few days through gcj and failed (like I always do in my life ...) but prefer now to pay You for Your pain. Chapeau! Now the problem: I downloaded 1.1.1 and wrote a standard Hello-App named Wuff.java (I am a dog owner), included swt.jar in the project, added command line flags "--classpath=C:\jnc\swt.jar" (checked) and "-findirect-dispatch", excluded GUI and JCE packages (by the way: java.text contains the often-used SimpleDateFormat and DecimalFormat - better leave it in the core jar!!!!) and compiled it successfully. Starting it on the Dos-Box told me: C:\jnc>Wuff Exception in thread "main" java.lang.UnsatisfiedLinkError: swt-win32-3218: can' ... So I copied the swt-win-32-3235.dll enclosed in Your download into the directory of Wuff.exe It failed again, so I looked closer to the error message and detected, that it was expecting ..3218.dll, not 3225. Renaming did the job an the dog barked. Would You please take a look to the different expected versions? Maybe 3225 contains a few sexy features more than 3118. Or is only the message outdated (Copy&Paste)? Greetings from Speyer Maximilian Eberl |
From: Marco T. <ma...@mt...> - 2009-06-29 10:10:48
|
Dear Mario Mario De Weerd wrote: > Hi > > I've almost built my opensource app 'BT747' using JNC after getting rid > of some unsupported method calls like String.format and > BufferedImage.getTransparency. > I am now at the final 'link'. I've used Proguard to get rid of most of > the rest. > > I get this kind of messages (I build using ant, so I use the > autocompiler, resulting in the '[exec prefixes]): > [exec] > C:/xxx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0xdf2): > undefined reference to `java::lang::String* > gnu::io::CommPortIdentifier::native_psmisc_report_owner(java::lang::String*)' > [exec] > C:/xx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0x26d4): > undefined reference to `void gnu::io::I2C::eventLoop()' > [exec] > C:/xxx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0x2bee): > undefined reference to `int gnu::io::I2C::open(java::lang::String*)' > [exec] > C:/xxx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0x2c52): > undefined reference to `void gnu::io::I2C::nativeSetI2CPortParams(int, > int, int, int)' So, are these native methods from classes in your jar? > I've set the java.library.path as this information line shows: > [exec] > -Djava.library.path=lib;C:\xxx\workspace\BT747\lib\rxtx-2.1-7-bins-r2\Windows\i368-mingw32 There's no need for a classpath for the compilation. It might even interfere with the proper compilation if something wrong is picked up. Please try without it. > I've tried both JNI and CNI. Maybe you first tried CNI and the compiled jar was cached. Then you changed to JNI (what would be correct) but the compiled jar with CNI was reused? This is of course just a guess. But if the undefined references are coming from your code, then this sounds plausible. Hope that helps Marco > Regarding the first link error, this is defined int he code as: > private native String native_psmisc_report_owner(String PortName); > > > I'll look further and I'll probably find it, but if somebody has the > anwser, it will surely save some time. > > Kind regads > > Mario > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Mario De W. <m.d...@ie...> - 2009-06-28 20:02:39
|
Hi I've almost built my opensource app 'BT747' using JNC after getting rid of some unsupported method calls like String.format and BufferedImage.getTransparency. I am now at the final 'link'. I've used Proguard to get rid of most of the rest. I get this kind of messages (I build using ant, so I use the autocompiler, resulting in the '[exec prefixes]): [exec] C:/xxx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0xdf2): undefined reference to `java::lang::String* gnu::io::CommPortIdentifier::native_psmisc_report_owner(java::lang::String*)' [exec] C:/xx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0x26d4): undefined reference to `void gnu::io::I2C::eventLoop()' [exec] C:/xxx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0x2bee): undefined reference to `int gnu::io::I2C::open(java::lang::String*)' [exec] C:/xxx/workspace/BT747/lib/RXTXcomm-win.jar.o:RXTXcomm.jar:(.text+0x2c52): undefined reference to `void gnu::io::I2C::nativeSetI2CPortParams(int, int, int, int)' I've set the java.library.path as this information line shows: [exec] -Djava.library.path=lib;C:\xxx\workspace\BT747\lib\rxtx-2.1-7-bins-r2\Windows\i368-mingw32 I've tried both JNI and CNI. Regarding the first link error, this is defined int he code as: private native String native_psmisc_report_owner(String PortName); I'll look further and I'll probably find it, but if somebody has the anwser, it will surely save some time. Kind regads Mario |
From: Christopher B. <rex...@ho...> - 2009-06-26 19:16:28
|
Whenever I try to compile a .jar file I have, I get this message: "No Windows compiler has been set!" How do I remedy this? Thanks! CSB |
From: Marco T. <ma...@mt...> - 2009-06-24 08:44:46
|
Dear Dan dan wrote: > Hi All, > > Does anyone have any experience in compiling java midi programs? I don't. > The below simple examples compiles just fine but > "MidiSystem.getMidiDeviceInfo( > );" returns an empty array? It's probably not implemented in GNU Classpath... If it's not working by default, I don't think that there's an easy way to get it working. You might want to try a third party library that offers what you need... Marco > FYI, i am running a standard W32 installation. > > Any help would be greatly appreciated. > Kind Regards, > Dan > > //----------------------------------------------------------------------------------- > import javax.sound.midi.MidiSystem; > import javax.sound.midi.MidiDevice; > > public class midi { > public static void main(String[] args) { > System.out.println("begin"); > > MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo(); > String temp = "nothing"; > > System.out.println("length=" + infos.length); > for (int i = 0; i < infos.length; i++) { > temp = temp + infos[i].hashCode() + ", Name=" + > infos[i].getName() + ", Vendor=" + infos[i].getVendor() + ", > Description=" + infos[i].getDescription() + ", Version=" + > infos[i].getVersion(); > } > System.out.println(temp); > > System.out.println("end"); > } > } > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: dan <dan...@go...> - 2009-06-24 08:39:10
|
Hi All, Does anyone have any experience in compiling java midi programs? The below simple examples compiles just fine but "MidiSystem.getMidiDeviceInfo();" returns an empty array? FYI, i am running a standard W32 installation. Any help would be greatly appreciated. Kind Regards, Dan //----------------------------------------------------------------------------------- import javax.sound.midi.MidiSystem; import javax.sound.midi.MidiDevice; public class midi { public static void main(String[] args) { System.out.println("begin"); MidiDevice.Info[] infos = MidiSystem.getMidiDeviceInfo(); String temp = "nothing"; System.out.println("length=" + infos.length); for (int i = 0; i < infos.length; i++) { temp = temp + infos[i].hashCode() + ", Name=" + infos[i].getName() + ", Vendor=" + infos[i].getVendor() + ", Description=" + infos[i].getDescription() + ", Version=" + infos[i].getVersion(); } System.out.println(temp); System.out.println("end"); } } |
From: Marco T. <ma...@mt...> - 2009-03-30 07:27:18
|
Hey Syed Syed Ahmed wrote: > Are there any plans for a new release soon? No, I'm afraid that I will no longer maintain JNC. The reason for this is that I have the impression that GCJ is dead since OpenJDK was started. So there's no point in keeping JNC alive if the backend is dead... Sorry for the bad news... Marco > There are lots of bugs which are fixed in gcj since the release of JNC 1.1.1 > > Thanks > Syed > > > ------------------------------------------------------------------------------ > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Syed A. <sye...@sb...> - 2009-03-29 17:44:38
|
Are there any plans for a new release soon? There are lots of bugs which are fixed in gcj since the release of JNC 1.1.1 Thanks Syed |
From: Marco T. <ma...@mt...> - 2008-08-26 06:44:23
|
Steve Ash wrote: > Marco- > > I took your advice and created a crossed-native GCC (with latest > releases of GCC et al). I removed the gcc-122233-win and copied in my > compiled gcc in JNC. However, when I try to run something with JNC. I > get following problems in the console window on Step 4 of 4: > > creating "SimpleTest.exe" for Windows > - main compilation step > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/java/text/Collator.java:138: > multiple definition of `java::text::Collator::Collator()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x820): first defined here You can't use the "exclude gui" and "exclude javax.crypto" stubs since they are for a specific GCJ version. They have to be created anew for every GCJ update. Do not exclude things and your GCJ should work fine. Hope that helps Marco > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): > In function `_ZN4java4text8Collator11getInstanceEJPS1_PNS_4util6LocaleE': > /home/steve/gcc_src/libjava/java/text/Collator.java:304: multiple > definition of `java::text::Collator* > java::text::Collator::getInstance(java::util::Locale*)' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x840): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:404: > multiple definition of `java::text::DateFormat::DateFormat()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x8f0): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:436: > multiple definition of `bool > java::text::DateFormat::equals(java::lang::Object*)' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0xa00): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:468: > multiple definition of `java::lang::Object* java::text::DateFormat::clone()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0xa10): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): > In function > `_ZN4java4text10DateFormat6formatEJPNS_4lang12StringBufferEPNS2_6ObjectES4_PNS0_13FieldPositionE': > /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:490: > multiple definition of `java::lang::StringBuffer* > java::text::DateFormat::format(java::lang::Object*, > java::lang::StringBuffer*, java::text::FieldPosition*)' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9a0): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): > In function > `_ZN4java4text10DateFormat6formatEJPNS_4lang6StringEPNS_4util4DateE': > /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:506: > multiple definition of `java::lang::String* > java::text::DateFormat::format(java::util::Date*)' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x950): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:546: > multiple definition of `java::util::Calendar* > java::text::DateFormat::getCalendar()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x940): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): > In function `_ZN4java4text10DateFormat19getDateTimeInstanceEJPS1_v': > /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:769: > multiple definition of `java::text::DateFormat* > java::text::DateFormat::getDateTimeInstance()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x980): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): > In function `_ZN4java4text10DateFormat11getInstanceEJPS1_v': > /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:832: > multiple definition of `java::text::DateFormat* > java::text::DateFormat::getInstance()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x910): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:843: > multiple definition of `java::text::NumberFormat* > java::text::DateFormat::getNumberFormat()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9d0): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:915: > multiple definition of `java::util::TimeZone* > java::text::DateFormat::getTimeZone()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x930): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:925: > multiple definition of `int java::text::DateFormat::hashCode()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x960): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:940: > multiple definition of `bool java::text::DateFormat::isLenient()' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9e0): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:953: > multiple definition of `java::util::Date* > java::text::DateFormat::parse(java::lang::String*)' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9c0): first defined here > c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:995: > multiple definition of `java::lang::Object* > java::text::DateFormat::parseObject(java::lang::String*, > java::text::ParsePosition*)' > libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9b0): first defined here > > > Do I need to copy some of my jars/classes into your lib directory or > remove some of the JNC packaged ones? > > Thanks in advance for any help that anyone can provide. > > Steve > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Steve A. <ste...@gm...> - 2008-08-26 03:41:48
|
Marco- I took your advice and created a crossed-native GCC (with latest releases of GCC et al). I removed the gcc-122233-win and copied in my compiled gcc in JNC. However, when I try to run something with JNC. I get following problems in the console window on Step 4 of 4: creating "SimpleTest.exe" for Windows - main compilation step c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/java/text/Collator.java:138: multiple definition of `java::text::Collator::Collator()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x820): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): In function `_ZN4java4text8Collator11getInstanceEJPS1_PNS_4util6LocaleE': /home/steve/gcc_src/libjava/java/text/Collator.java:304: multiple definition of `java::text::Collator* java::text::Collator::getInstance(java::util::Locale*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x840): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:404: multiple definition of `java::text::DateFormat::DateFormat()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x8f0): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:436: multiple definition of `bool java::text::DateFormat::equals(java::lang::Object*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0xa00): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:468: multiple definition of `java::lang::Object* java::text::DateFormat::clone()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0xa10): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): In function `_ZN4java4text10DateFormat6formatEJPNS_4lang12StringBufferEPNS2_6ObjectES4_PNS0_13FieldPositionE': /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:490: multiple definition of `java::lang::StringBuffer* java::text::DateFormat::format(java::lang::Object*, java::lang::StringBuffer*, java::text::FieldPosition*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9a0): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): In function `_ZN4java4text10DateFormat6formatEJPNS_4lang6StringEPNS_4util4DateE': /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:506: multiple definition of `java::lang::String* java::text::DateFormat::format(java::util::Date*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x950): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:546: multiple definition of `java::util::Calendar* java::text::DateFormat::getCalendar()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x940): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): In function `_ZN4java4text10DateFormat19getDateTimeInstanceEJPS1_v': /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:769: multiple definition of `java::text::DateFormat* java::text::DateFormat::getDateTimeInstance()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x980): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o): In function `_ZN4java4text10DateFormat11getInstanceEJPS1_v': /home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:832: multiple definition of `java::text::DateFormat* java::text::DateFormat::getInstance()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x910): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:843: multiple definition of `java::text::NumberFormat* java::text::DateFormat::getNumberFormat()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9d0): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:915: multiple definition of `java::util::TimeZone* java::text::DateFormat::getTimeZone()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x930): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:925: multiple definition of `int java::text::DateFormat::hashCode()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x960): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:940: multiple definition of `bool java::text::DateFormat::isLenient()' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9e0): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:953: multiple definition of `java::util::Date* java::text::DateFormat::parse(java::lang::String*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9c0): first defined here c:/javanativecompiler-1.1.1/gcc-122233-win/bin/../lib/gcc/i686-pc-mingw32/4.3.1/../../../libgcj.a(lt48-text.o):/home/steve/gcc_src/libjava/classpath/java/text/DateFormat.java:995: multiple definition of `java::lang::Object* java::text::DateFormat::parseObject(java::lang::String*, java::text::ParsePosition*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x9b0): first defined here Do I need to copy some of my jars/classes into your lib directory or remove some of the JNC packaged ones? Thanks in advance for any help that anyone can provide. Steve |
From: Marco T. <ma...@mt...> - 2008-08-23 06:16:11
|
Hello Steve Steve Ash wrote: > Marco- > > What steps did you take to create the gcc package that is on JNC > downloads page? That's actually more a GCJ related question and I belongs in it's users mailinglist (there are also multiple equal questions in the archive there). Anyway, since I'm already writing; this is what you're looking for: http://rmathew.com/articles/gcj/bldgcj.html But be aware that, since no one (as far as I know) has built GCJ for mingw in a while, there will probably be some compilation problems and errors to fix. But nothing major since GCJ hasn't evolved much lately (since OpenJDK is around). > New versions of gcc and classpath have been released > and I would like to update mine. I am a windows user, so I apologize > for being ignorant of these rudimentary tasks. There's never a reason to apologize for asking something you don't know. Only apologize if you don't ask because you're afraid (it might be a stupid question) ;-) Hope that helps Marco > Thanks in advance for > any guidance you or anyone else can provide. > > Steve > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Steve A. <ste...@gm...> - 2008-08-22 22:13:05
|
Marco- What steps did you take to create the gcc package that is on JNC downloads page? New versions of gcc and classpath have been released and I would like to update mine. I am a windows user, so I apologize for being ignorant of these rudimentary tasks. Thanks in advance for any guidance you or anyone else can provide. Steve |
From: Marco T. <ma...@mt...> - 2008-07-23 05:44:00
|
Hello Mike Mike Rerick wrote: > Marco, > > I am having problems getting JNC to build an exe. I have downloaded the > GUI frontend and the Windows gcc compiler on the JNC download page. > > I unzipped the front end into a folder then unzipped the gcc-122233-win > zip into the front end GUI’s folder (so I have > …\JavaNaticeCompiler-1.1.1\gcc-122233-win\...) So far so good... > I have Sun’s JDK 1.6.0_06 installed. Does not matter. JNC is a stand-alone compiler. It does not need an installed JDK. > I copied gcj.exe from the > gcc-122233-win\bin folder to the <JDK>\bin folder. I copied > gcc-122233-win\lib\ libgcj.spec to the folder containing the > JavaNativeCompiler executable. I pointed the front end to the classes > folder where my compiled test class resides. I set the java.library.path > to ‘.’. I set the following gcj option: --classpath= > <path-to-JDK>\jre\lib; > <path-to>\JavaNativeCompiler-1.1.1\gcc-122233-win\lib. (I have tried > this with Sun’s JDK 1.5.0_16 with the same lack of success) What? What are you trying to do? Why? Undo all these and just start JNC from the JavaNaticeCompiler-1.1.1 directory. > I also added <path-to>\gcc-122233-win\bin, > <path-to>\gcc-122233-win\libexec\gcc\i686-pc-mingw32\4.3.0 and > <path-to>\gcc-122233-win\i686-pc-mingw32\bin to my Path environmental > variable. > > > > I’m getting the following errors when I try to compile: > > Test.java:0: error: cannot find file for class java.lang.Object > > Test.java:0: error: cannot find file for class java.lang.Object > > Test.java: In class 'com.iws.Test.bcc.Test: > > Test.java: In constructor '()': > > Test.java:12: error: cannot find file for class java.lang.Object > > Test.java:12: error: class 'java.lang.Object' has no method > named '<init>' matching signature '()V' > > Test.java:12: confused by earlier errors, bailing out And what did you expect when using the wrong library? Marco > Here is the project file: > > dir=C:\MasterBuild-Dev\BuildControlCenter\build\classes > > mainClass=com.iws.Test.bcc.Test#C:\MasterBuild-Dev\BuildControlCenter\build\classes > > javaLibPath=. > > useCni=true > > compileWindows=true > > windowsFile=C:\MasterBuild-Dev\BuildControlCenter\Test.exe > > compileLinux=false > > linuxFile=C:\MasterBuild-Dev\BuildControlCenter\Test.lin > > omitStripping=false > > omitPacking=false > > disableOptimisation=false > > iconFile=null > > useIcon=false > > hideConsole=false > > gcjFlag=--classpath=C:\Dev\Java\jdk1.6.0_06\jre\lib;C:\Dev\Java\NativeCompiler\JavaNativeCompiler-1.1.1\gcc-122233-win\lib,false > > showCommands=true > > excludeGui=true > > excludeJce=true > > addGnuRegex=false > > dontCacheJars=false > > beepWhenDone=false > > > > > > > > Here is the Test class code, which compiles in NetBeans with no problems: > > /* > > * This is the test class. > > */ > > > > package com.iws.Test.bcc; > > > > /** > > * > > * @author */ > > public class Test { > > public Test() { > > } > > > > > > /** > > * Runs the Test > > * @param args > > */ > > public static void main(String[] args) { > > if(args.length == 0) { > > usage(); > > System.exit(0); > > } > > } > > > > public static void usage() { > > System.out.println(); > > System.out.println(); > > System.out.println("Usage:"); > > System.out.println(" Test params"); > > System.out.println(" where params are command"); > > System.out.println(" line parameters"); > > System.out.println(); > > System.out.println(); > > } > > } > > > > Any help would be greatly appreciated. > > > > Thanks! > > > > Mike Rerick > > Sr. Software Engineer – Professional Services > > <blocked::http://www.iwsinc.com/>** > > > > 9200 S.E. Sunnybrook Blvd., Suite 170 > > Clackamas, OR 97015 > > Phone: (503) 353-8068 Fax: (503) 353-8065 > > > > > > The information contained in this transmission contains potentially > privileged, export controlled and/or confidential information of > Imageware Systems, Inc. or its customers or partners. It is intended > only to be read by the person(s) named above and for no other purpose. > You are hereby notified that any dissemination, distribution, > duplication of this communication or use of its contents for any purpose > not authorized expressly by Imageware Systems, Inc. is strictly > prohibited and could lead to both civil and/or criminal penalties. If > you are not the intended recipient, you are prohibited to review the > contents herein and please contact the sender by reply e-mail and > destroy all copies of the original message. To reply to our e-mail > administrator directly, please send an e-mail to ema...@iw... > > > ------------------------------------------------------------------------ > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Marco T. <ma...@mt...> - 2008-07-16 18:10:16
|
Hello André André 'streeto' Amorim wrote: > Marco, catching the NPE will prevent the crash in c.connect(), but the > application starts to behave strangely, and then just segfaults. Whew! In this case there's a serious problem, not just a non-Sun-JRE behavior as I suspected. > I found > a workaround, you can add this line: > > InetAddress addr = InetAddress.getByName(new > URL("http://bogusurl/asdf/").getHost()); Great, thank you! Marco > This will cause an UnknownHostException if the host is unreachable. The > snippet I sent before becomes, then, > > import java.net.InetAddress; > import java.net.URL; > import java.net.URLConnection; > > public class URLConnectionTest { > static public void main(String[] args) { > try { > System.out.println("first try"); > URL u = new URL("http://www.hasdklashdklj.com/"); > System.out.println(u); > > // HACK (GCJ): will throw an UnknownHostException if host is > unreachable. > @SuppressWarnings("unused") > InetAddress addr = InetAddress.getByName(u.getHost()); > > URLConnection c = u.openConnection(); > System.out.println(c); > c.connect(); > System.out.println("done"); > } catch (Exception e) { > System.out.println("nono"); > e.printStackTrace(); > } > } > } > > Hope this helps. > > André. > > On Tue, Jul 15, 2008 at 11:24 AM, Marco Trudel <ma...@mt...> wrote: > > Hello André > > André 'streeto' Amorim wrote: > > Hi, I just had the same problem Avi Cohen reported a couple > months ago. Using a url that does not exist leads to a NPE. The > code I used for testing is almost the same: > > import java.net.URL; > import java.net.URLConnection; > > public class URLConnectionTest { > static public void main(String[] args) { > try { > URL u = new URL("http://www.hasdklashdklj.com/"); > System.out.println(u); > URLConnection c = u.openConnection(); > System.out.println(c); > c.connect(); > System.out.println("done"); > } catch (Exception e) { > System.out.println("nono"); > e.printStackTrace(); > } > } > } > > Here's the setup: > > JNC-1.1.1 > gcc-122233 > Using Windows XP > Compiling for Windows > Compiling from source > Config: > Not excluding JCE > Not optimizing > Not stripping > Not packing > All the other options are the default (new project) > > Here's the output: > > A. exclude JCE, add GNU regex > > http://www.hasdklashdklj.com/ > nono > java.lang.NullPointerException > at > java.net.URLConnection.toString(/usr/local/src/gcc/libjava/classpath/java/net/URLConnection.java:627) > at > java.io.PrintStream.println(/usr/local/src/gcc/libjava/java/io/PrintStream.java:473) > at > URLConnectionTest.main(C:/DOCUME~1/andre/CONFIG~1/Temp/ccOsbaaa.jar:0) > > > B. not excluding JCE, not adding GNU regex (does not seem to > interfer, tried with and without) > > http://www.hasdklashdklj.com/ > gnu.java.net.protocol.http.HTTPURLConnection:http://www.hasdklashdklj.com/ > nono > java.lang.NullPointerException > <<No stacktrace available>> > > > The output in eclipse is > > http://www.hasdklashdklj.com/ > sun.net.www.protocol.http.HttpURLConnection:http://www.hasdklashdklj.com/ > nono > java.net.UnknownHostException: www.hasdklashdklj.com > <http://www.hasdklashdklj.com> <http://www.hasdklashdklj.com> > > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) > (...) > > > Anybody has a workaround? I can't find a way to check the URL > without using URL.openConnection(). > > > maybe: > try { ... } catch(NullPointerException ex) { /* illegal url */ } > ? > > > Marco > > []s > > André. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere > in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > <mailto:jav...@li...> > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: A. 's. A. <str...@gm...> - 2008-07-15 21:03:25
|
Marco, catching the NPE will prevent the crash in c.connect(), but the application starts to behave strangely, and then just segfaults. I found a workaround, you can add this line: InetAddress addr = InetAddress.getByName(new URL(" http://bogusurl/asdf/").getHost()); This will cause an UnknownHostException if the host is unreachable. The snippet I sent before becomes, then, import java.net.InetAddress; import java.net.URL; import java.net.URLConnection; public class URLConnectionTest { static public void main(String[] args) { try { System.out.println("first try"); URL u = new URL("http://www.hasdklashdklj.com/"); System.out.println(u); // HACK (GCJ): will throw an UnknownHostException if host is unreachable. @SuppressWarnings("unused") InetAddress addr = InetAddress.getByName(u.getHost()); URLConnection c = u.openConnection(); System.out.println(c); c.connect(); System.out.println("done"); } catch (Exception e) { System.out.println("nono"); e.printStackTrace(); } } } Hope this helps. André. On Tue, Jul 15, 2008 at 11:24 AM, Marco Trudel <ma...@mt...> wrote: > Hello André > > André 'streeto' Amorim wrote: > >> Hi, I just had the same problem Avi Cohen reported a couple months ago. >> Using a url that does not exist leads to a NPE. The code I used for testing >> is almost the same: >> >> import java.net.URL; >> import java.net.URLConnection; >> >> public class URLConnectionTest { >> static public void main(String[] args) { >> try { >> URL u = new URL("http://www.hasdklashdklj.com/"); >> System.out.println(u); >> URLConnection c = u.openConnection(); >> System.out.println(c); >> c.connect(); >> System.out.println("done"); >> } catch (Exception e) { >> System.out.println("nono"); >> e.printStackTrace(); >> } >> } >> } >> >> Here's the setup: >> >> JNC-1.1.1 >> gcc-122233 >> Using Windows XP >> Compiling for Windows >> Compiling from source >> Config: >> Not excluding JCE >> Not optimizing >> Not stripping >> Not packing >> All the other options are the default (new project) >> >> Here's the output: >> >> A. exclude JCE, add GNU regex >> >> http://www.hasdklashdklj.com/ >> nono >> java.lang.NullPointerException >> at >> java.net.URLConnection.toString(/usr/local/src/gcc/libjava/classpath/java/net/URLConnection.java:627) >> at >> java.io.PrintStream.println(/usr/local/src/gcc/libjava/java/io/PrintStream.java:473) >> at >> URLConnectionTest.main(C:/DOCUME~1/andre/CONFIG~1/Temp/ccOsbaaa.jar:0) >> >> >> B. not excluding JCE, not adding GNU regex (does not seem to interfer, >> tried with and without) >> >> http://www.hasdklashdklj.com/ >> gnu.java.net.protocol.http.HTTPURLConnection: >> http://www.hasdklashdklj.com/ >> nono >> java.lang.NullPointerException >> <<No stacktrace available>> >> >> >> The output in eclipse is >> >> http://www.hasdklashdklj.com/ >> sun.net.www.protocol.http.HttpURLConnection:http://www.hasdklashdklj.com/ >> nono >> java.net.UnknownHostException: www.hasdklashdklj.com < >> http://www.hasdklashdklj.com> >> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) >> (...) >> >> >> Anybody has a workaround? I can't find a way to check the URL without >> using URL.openConnection(). >> > > maybe: > try { ... } catch(NullPointerException ex) { /* illegal url */ } > ? > > > Marco > > []s >> >> André. >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> javaCompiler-users mailing list >> jav...@li... >> https://lists.sourceforge.net/lists/listinfo/javacompiler-users >> > > |