Thread: Re: [javaCompiler-users] Request for AWT information
Status: Beta
Brought to you by:
soapy
From: Lee D. P. <le...@3s...> - 2006-12-21 18:37:16
|
Thanks for the quick reply. > Do you compile for Windows or for Linux? I'm specifically trying to compile on Windows for this application. > Does that application run with a Sun 1.4 JRE or does it depend on 1.5 > methods? Heh, well actually the code I'm compiling is designed to run with any JVM 1.1 or above so I don't think that is the issue. =20 I've just tested the AWT example and that compiles ok so it must be something in my configuration. I was compiling from a set of jar files from our standard java build so I've changed to use source and there are less warnings, in fact the only warnings I'm seeing now are from one of the libraries we are using and again they are awt and swing methods. Do you think there is an issue with linkage and compiling from jars? I don't know if it's relevant but I could get the same jars to compile using the 0.9 version of NativeJ although that failed with ClassNotFoundExceptions when AWT stuff was loaded. I'm going to get the source to this external library and compile it directly, hopefully that will resolve the issue. Thanks again, Lee > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 21 December 2006 17:44 > To: A mailing list for general questions and discussions. > Subject: Re: [javaCompiler-users] Request for AWT information >=20 > Lee D. Painter wrote: > > Hi, > > > > > > > > I've been looking at JNC and it shows much promise J > > > > > > > > However I'm trying to compile a small java app on Windows that uses AWT > > but am getting undefined reference errors for AWT methods. >=20 > Do you compile for Windows or for Linux? > Does that application run with a Sun 1.4 JRE or does it depend on 1.5 > methods? >=20 > If you only compile for Windows and the application runs with a Sun 1.4 > JRE, then it's probably a bug. >=20 >=20 > > I assume this > > is because I need to configure JNC somehow to link to an awt.dll (like > > the one in the AWT example). >=20 > No, you don't have to do anything special. If you want to compile the > AWT example, just add it as source and compile it. > awt.dll and the other files are only needed at runtime. >=20 >=20 > > I've searched these mailing lists and > > cannot find any information about how this can be achieved. Can someone > > provide a quick overview of what we need to do to get AWT support > working? >=20 > Nothing, it runs out of the box :-) > Or at least should. I mainly program SWT, so I didn't have fancy > applications to test. So your feedback is really welcome. >=20 >=20 > Marco >=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: Lee D. P. <le...@3s...> - 2006-12-22 09:54:57
|
> All worked now? I assume you mean by the classes. Or did you download > all sources? It's compiling and linking from source once I had grabbed the source to the troublesome jar, I'm still missing a few resources that were in the jars but that should be easy to sort. > What do you mean by "system properties"? Something you can get by > System.getProperty("name")? Then just add a custom flag: > -Dsome.property=3Dfoobar > Or do you mean stuff like PATH or so? That's not possible. That's not > possible with C applications as well (as far as I know)... > Yes standard java system properties is what I need to set, should have realized that you could pass it through as a custom flag :-) Thanks Lee > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 21 December 2006 20:09 > To: A mailing list for general questions and discussions. > Subject: Re: [javaCompiler-users] Request for AWT information >=20 > Lee D. Painter wrote: > > Great, I look forward to the update. I've been able to compile from > source, >=20 > All worked now? I assume you mean by the classes. Or did you download > all sources? >=20 >=20 > > but it would certainly be easier from jars as all the additonal > resources > > are packaged up correctly already. >=20 > Of course. >=20 >=20 > > btw I'm compiling on Windows for Windows. >=20 > :-) >=20 >=20 > > I'd like to be able to set some custom system properties in the .exe, > > I know this is possible through gcj do you have plans to add this, > > or is there some way I can do that now? >=20 > What do you mean by "system properties"? Something you can get by > System.getProperty("name")? Then just add a custom flag: > -Dsome.property=3Dfoobar > Or do you mean stuff like PATH or so? That's not possible. That's not > possible with C applications as well (as far as I know)... >=20 >=20 > Marco >=20 > > > > Regards > > > > Lee > > ________________________________ > > > > From: jav...@li... on behalf of > Marco Trudel > > Sent: Thu 21/12/2006 19:17 > > To: A mailing list for general questions and discussions. > > Subject: Re: [javaCompiler-users] Request for AWT information > > > > > > > > Lee D. Painter wrote: > >> Thanks for the quick reply. > >> > >>> Do you compile for Windows or for Linux? > >> I'm specifically trying to compile on Windows for this application. > > > > Yeah, on Windows, but on Windows for Linux or for Windows? > > It's all kind of confusing because you can crosscompile :-) > > But read below... > > > > > >>> Does that application run with a Sun 1.4 JRE or does it depend on 1.5 > >>> methods? > >> Heh, well actually the code I'm compiling is designed to run with any > >> JVM 1.1 or above so I don't think that is the issue. > >> > >> I've just tested the AWT example and that compiles ok so it must be > >> something in my configuration. I was compiling from a set of jar files > >>> >from our standard java build so I've changed to use source and there > are > >> less warnings, in fact the only warnings I'm seeing now are from one of > >> the libraries we are using and again they are awt and swing methods. Do > >> you think there is an issue with linkage and compiling from jars? > > > > Yes, of course! I forgot to add some configuration for jar compiling! > > Thanks for pointing that out. I'll release a new Version tomorrow. > > You'll only need to update the GUI frontend, the huge compilers stay the > > same... > > In the mean time, just unpack the jars and compile from the directory > > with the extracted classes. I usually suggest to compile from classes > > instead of the sources anyway. > > > > > >> I don't know if it's relevant but I could get the same jars to compile > >> using the 0.9 version of NativeJ although that failed with > >> ClassNotFoundExceptions when AWT stuff was loaded. > > > > Yeah, AWT/Swing doesn't work in 0.9. > > > > > >> I'm going to get the source to this external library and compile it > >> directly, hopefully that will resolve the issue. > > > > Not needed as explained above. I hope it works by compiling from the > > classes... > > > > > > Marco > > > > ------------------------------------------------------------------------ > - > > 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 >=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...> - 2006-12-22 11:02:44
|
Lee D. Painter wrote: >> All worked now? I assume you mean by the classes. Or did you download >> all sources? > > It's compiling and linking from source once I had grabbed the source to > the troublesome jar, I'm still missing a few resources that were in the > jars but that should be easy to sort. Version 1.0.1 is uploaded now. With it, you can compile from your jars. It's not on every mirror yet, so you might have to try different ones (Lausanne Switzerland works for sure). >> What do you mean by "system properties"? Something you can get by >> System.getProperty("name")? Then just add a custom flag: >> -Dsome.property=foobar >> Or do you mean stuff like PATH or so? That's not possible. That's not >> possible with C applications as well (as far as I know)... >> > > Yes standard java system properties is what I need to set, should have > realized that you could pass it through as a custom flag :-) :-) I'd be glad to hear if your AWT application works flawless... Marco |
From: Lee D. P. <le...@3s...> - 2006-12-22 13:22:03
|
Thanks for that, I now have 1.0.1 but there is another problem. I've added some system properties to the custom GCJ flags and the compile fails on a jar compile gcj: can't specify -D without --main The problem I have is that without the system properties the product will not function :( I can hack it for now by adding a command line parameter to set them, maybe that's a better solution anyway. Regards Lee > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 22 December 2006 11:03 > To: A mailing list for general questions and discussions. > Subject: Re: [javaCompiler-users] Request for AWT information >=20 > Lee D. Painter wrote: > >> All worked now? I assume you mean by the classes. Or did you download > >> all sources? > > > > It's compiling and linking from source once I had grabbed the source to > > the troublesome jar, I'm still missing a few resources that were in the > > jars but that should be easy to sort. >=20 > Version 1.0.1 is uploaded now. With it, you can compile from your jars. > It's not on every mirror yet, so you might have to try different ones > (Lausanne Switzerland works for sure). >=20 >=20 > >> What do you mean by "system properties"? Something you can get by > >> System.getProperty("name")? Then just add a custom flag: > >> -Dsome.property=3Dfoobar > >> Or do you mean stuff like PATH or so? That's not possible. That's not > >> possible with C applications as well (as far as I know)... > >> > > > > Yes standard java system properties is what I need to set, should have > > realized that you could pass it through as a custom flag :-) >=20 > :-) >=20 >=20 > I'd be glad to hear if your AWT application works flawless... >=20 > Marco >=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...> - 2006-12-22 13:37:28
|
Lee D. Painter wrote: > Thanks for that, I now have 1.0.1 but there is another problem. I've > added some system properties to the custom GCJ flags and the compile > fails on a jar compile > > gcj: can't specify -D without --main I assume that the properties have spaces, right? I don't think I handle spaces correctly because arguments of GCJ usually don't have any. Are you able to remove the spaces? Else I can release a version that handles spaces correctly. > The problem I have is that without the system properties the product > will not function :( I can hack it for now by adding a command line > parameter to set them, maybe that's a better solution anyway. I think it would be cleaner to be able to specify them in the compiler. What do you think? Marco > Regards > > Lee >> -----Original Message----- >> From: jav...@li... >> [mailto:jav...@li...] On Behalf Of >> Marco Trudel >> Sent: 22 December 2006 11:03 >> To: A mailing list for general questions and discussions. >> Subject: Re: [javaCompiler-users] Request for AWT information >> >> Lee D. Painter wrote: >>>> All worked now? I assume you mean by the classes. Or did you > download >>>> all sources? >>> It's compiling and linking from source once I had grabbed the source > to >>> the troublesome jar, I'm still missing a few resources that were in > the >>> jars but that should be easy to sort. >> Version 1.0.1 is uploaded now. With it, you can compile from your > jars. >> It's not on every mirror yet, so you might have to try different ones >> (Lausanne Switzerland works for sure). >> >> >>>> What do you mean by "system properties"? Something you can get by >>>> System.getProperty("name")? Then just add a custom flag: >>>> -Dsome.property=foobar >>>> Or do you mean stuff like PATH or so? That's not possible. That's > not >>>> possible with C applications as well (as far as I know)... >>>> >>> Yes standard java system properties is what I need to set, should > have >>> realized that you could pass it through as a custom flag :-) >> :-) >> >> >> I'd be glad to hear if your AWT application works flawless... >> >> Marco >> >> > ------------------------------------------------------------------------ > - >> 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=DEVDEV > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |
From: Lee D. P. <le...@3s...> - 2006-12-22 13:45:32
|
> I assume that the properties have spaces, right? No, the properties I'm adding are: -Dcom.averick.ssl.allowUntrustedCertificates=3Dtrue -Dcom.maverick.ssl.allowInvalidCertificates=3Dtrue It looks to me like these are being included on the compilation step for the jar and only need to be included on the final main build step. > I think it would be cleaner to be able to specify them in the compiler. > What do you think? Well yes that would be cleaner as other users may have properties that have to be set in this way. Lee > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 22 December 2006 13:37 > To: A mailing list for general questions and discussions. > Subject: Re: [javaCompiler-users] Request for AWT information >=20 > Lee D. Painter wrote: > > Thanks for that, I now have 1.0.1 but there is another problem. I've > > added some system properties to the custom GCJ flags and the compile > > fails on a jar compile > > > > gcj: can't specify -D without --main >=20 > I assume that the properties have spaces, right? > I don't think I handle spaces correctly because arguments of GCJ usually > don't have any. Are you able to remove the spaces? Else I can release a > version that handles spaces correctly. >=20 > > The problem I have is that without the system properties the product > > will not function :( I can hack it for now by adding a command line > > parameter to set them, maybe that's a better solution anyway. >=20 > I think it would be cleaner to be able to specify them in the compiler. > What do you think? >=20 >=20 > Marco >=20 >=20 > > Regards > > > > Lee > >> -----Original Message----- > >> From: jav...@li... > >> [mailto:jav...@li...] On Behalf Of > >> Marco Trudel > >> Sent: 22 December 2006 11:03 > >> To: A mailing list for general questions and discussions. > >> Subject: Re: [javaCompiler-users] Request for AWT information > >> > >> Lee D. Painter wrote: > >>>> All worked now? I assume you mean by the classes. Or did you > > download > >>>> all sources? > >>> It's compiling and linking from source once I had grabbed the source > > to > >>> the troublesome jar, I'm still missing a few resources that were in > > the > >>> jars but that should be easy to sort. > >> Version 1.0.1 is uploaded now. With it, you can compile from your > > jars. > >> It's not on every mirror yet, so you might have to try different ones > >> (Lausanne Switzerland works for sure). > >> > >> > >>>> What do you mean by "system properties"? Something you can get by > >>>> System.getProperty("name")? Then just add a custom flag: > >>>> -Dsome.property=3Dfoobar > >>>> Or do you mean stuff like PATH or so? That's not possible. That's > > not > >>>> possible with C applications as well (as far as I know)... > >>>> > >>> Yes standard java system properties is what I need to set, should > > have > >>> realized that you could pass it through as a custom flag :-) > >> :-) > >> > >> > >> I'd be glad to hear if your AWT application works flawless... > >> > >> Marco > >> > >> > > ------------------------------------------------------------------------ > > - > >> 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 > > >=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...> - 2006-12-22 13:57:59
|
Lee D. Painter wrote: >> I assume that the properties have spaces, right? > > No, the properties I'm adding are: > > -Dcom.averick.ssl.allowUntrustedCertificates=true > -Dcom.maverick.ssl.allowInvalidCertificates=true > > It looks to me like these are being included on the compilation step for > the jar and only need to be included on the final main build step. You are right. I assumed that all flags are for jar compilation and the main compilation. But of course there exist flags that are only for the main compilation (but none that are only for jar compilation). I added it to my todo-list for version 1.1 since this is not a mayor problem. You can work around that by: 1. Compile your application without the flags. The compiled jars will be cached and reused in further compilations. 2. Add the flags and compile again. This is only bad if the jars change between every native compilation step. But that is very unlikely (I assume). Is that ok for you? Else I can put it higher in my priority list :-) Marco |
From: Lee D. P. <le...@3s...> - 2006-12-22 14:01:43
|
That's fine, I'm going to add the command line option anyway so it will not be an issue. I'll let you know what sort of success I have once I've had some time to test it fully. Regards Lee > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 22 December 2006 13:58 > To: A mailing list for general questions and discussions. > Subject: Re: [javaCompiler-users] Request for AWT information >=20 > Lee D. Painter wrote: > >> I assume that the properties have spaces, right? > > > > No, the properties I'm adding are: > > > > -Dcom.averick.ssl.allowUntrustedCertificates=3Dtrue > > -Dcom.maverick.ssl.allowInvalidCertificates=3Dtrue > > > > It looks to me like these are being included on the compilation step for > > the jar and only need to be included on the final main build step. >=20 > You are right. I assumed that all flags are for jar compilation and the > main compilation. But of course there exist flags that are only for the > main compilation (but none that are only for jar compilation). > I added it to my todo-list for version 1.1 since this is not a mayor > problem. You can work around that by: > 1. Compile your application without the flags. The compiled jars will be > cached and reused in further compilations. > 2. Add the flags and compile again. >=20 > This is only bad if the jars change between every native compilation > step. But that is very unlikely (I assume). >=20 > Is that ok for you? Else I can put it higher in my priority list :-) >=20 >=20 > Marco >=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: Lee D. P. <le...@3s...> - 2007-01-01 17:54:59
|
Marco, I have now been able to compile and test a native build of our application and all functionality is working as expected but there is one issue that will presently stop us using this in production. When displaying images that are compiled into the .exe they are corrupted.=20 You can see this for yourself. Original Java Runtime: http://3sp.com/Q38CEW924W/1.GIF Native Compiled .exe: http://3sp.com/Q38CEW924W/2.GIF Is this a known issue? To workaround the problem I thought it would be possible to reference a jar file instead of compiling it into the .exe as this jar file only contains image resources. However if I uncheck the relevant jar file in the archive section of the JNC GUI I get the following error on compile: creating "Agent.exe" for Windows - processing agent-resources.jar failed: java.io.FileNotFoundException: C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTempti0w8q.out\archive.a: The system cannot find the file specified. Any insight you could provide would be appreciated. Regards Lee -----Original Message----- From: jav...@li... [mailto:jav...@li...] On Behalf Of Marco Trudel Sent: 22 December 2006 13:58 To: A mailing list for general questions and discussions. Subject: Re: [javaCompiler-users] Request for AWT information Lee D. Painter wrote: >> I assume that the properties have spaces, right? >=20 > No, the properties I'm adding are: >=20 > -Dcom.averick.ssl.allowUntrustedCertificates=3Dtrue > -Dcom.maverick.ssl.allowInvalidCertificates=3Dtrue >=20 > It looks to me like these are being included on the compilation step for > the jar and only need to be included on the final main build step. You are right. I assumed that all flags are for jar compilation and the=20 main compilation. But of course there exist flags that are only for the=20 main compilation (but none that are only for jar compilation). I added it to my todo-list for version 1.1 since this is not a mayor=20 problem. You can work around that by: 1. Compile your application without the flags. The compiled jars will be cached and reused in further compilations. 2. Add the flags and compile again. This is only bad if the jars change between every native compilation=20 step. But that is very unlikely (I assume). Is that ok for you? Else I can put it higher in my priority list :-) Marco ------------------------------------------------------------------------ - 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-01-01 20:56:29
|
Lee D. Painter wrote: > Marco, > > I have now been able to compile and test a native build of our > application and all functionality is working as expected but there is > one issue that will presently stop us using this in production. When > displaying images that are compiled into the .exe they are corrupted. > > You can see this for yourself. > > Original Java Runtime: http://3sp.com/Q38CEW924W/1.GIF > > Native Compiled .exe: http://3sp.com/Q38CEW924W/2.GIF > > Is this a known issue? Yes, I recently stumbled over it myself. It seems that only GIFs have the problem. I suggest to use PNGs instead of GIFs. > To workaround the problem I thought it would be possible to reference a > jar file instead of compiling it into the .exe as this jar file only > contains image resources. However if I uncheck the relevant jar file in > the archive section of the JNC GUI I get the following error on compile: > > creating "Agent.exe" for Windows > - processing agent-resources.jar > > failed: > java.io.FileNotFoundException: > C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTempti0w8q.out\archive.a: The system > cannot find the file specified. If you uncheck the box, then only referenced classes will be used from the jar. Since you've only resources in that jar, nothing will be pulled in. This creates an error. You have to remove the jar completely from the list. But I think the image doesn't get corrupted during compilation. The problem is at runtime. I tried to load my GIFs from the filesystem but they painted wrong too (if I remember right)... Marco |
From: Lee D. P. <le...@3s...> - 2007-01-01 17:58:39
|
Forgot to add: I have two jar files that only contain resources and not any .class files. The jar file that contains text resources in the form of .properties files compiles without error, it's just the jar file that contains the images that fails (they are GIFs and ICO files). Lee -----Original Message----- From: jav...@li... [mailto:jav...@li...] On Behalf Of Lee D. Painter Sent: 01 January 2007 17:55 To: A mailing list for general questions and discussions. Subject: Re: [javaCompiler-users] Request for AWT information Marco, I have now been able to compile and test a native build of our application and all functionality is working as expected but there is one issue that will presently stop us using this in production. When displaying images that are compiled into the .exe they are corrupted.=20 You can see this for yourself. Original Java Runtime: http://3sp.com/Q38CEW924W/1.GIF Native Compiled .exe: http://3sp.com/Q38CEW924W/2.GIF Is this a known issue? To workaround the problem I thought it would be possible to reference a jar file instead of compiling it into the .exe as this jar file only contains image resources. However if I uncheck the relevant jar file in the archive section of the JNC GUI I get the following error on compile: creating "Agent.exe" for Windows - processing agent-resources.jar failed: java.io.FileNotFoundException: C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTempti0w8q.out\archive.a: The system cannot find the file specified. Any insight you could provide would be appreciated. Regards Lee -----Original Message----- From: jav...@li... [mailto:jav...@li...] On Behalf Of Marco Trudel Sent: 22 December 2006 13:58 To: A mailing list for general questions and discussions. Subject: Re: [javaCompiler-users] Request for AWT information Lee D. Painter wrote: >> I assume that the properties have spaces, right? >=20 > No, the properties I'm adding are: >=20 > -Dcom.averick.ssl.allowUntrustedCertificates=3Dtrue > -Dcom.maverick.ssl.allowInvalidCertificates=3Dtrue >=20 > It looks to me like these are being included on the compilation step for > the jar and only need to be included on the final main build step. You are right. I assumed that all flags are for jar compilation and the=20 main compilation. But of course there exist flags that are only for the=20 main compilation (but none that are only for jar compilation). I added it to my todo-list for version 1.1 since this is not a mayor=20 problem. You can work around that by: 1. Compile your application without the flags. The compiled jars will be cached and reused in further compilations. 2. Add the flags and compile again. This is only bad if the jars change between every native compilation=20 step. But that is very unlikely (I assume). Is that ok for you? Else I can put it higher in my priority list :-) Marco ------------------------------------------------------------------------ - 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-01-02 08:06:56
|
Thanks Marco, I'll try converting to PNG. > -----Original Message----- > From: jav...@li... > [mailto:jav...@li...] On Behalf Of > Marco Trudel > Sent: 01 January 2007 20:56 > To: A mailing list for general questions and discussions. > Subject: Re: [javaCompiler-users] Request for AWT information >=20 > Lee D. Painter wrote: > > Marco, > > > > I have now been able to compile and test a native build of our > > application and all functionality is working as expected but there is > > one issue that will presently stop us using this in production. When > > displaying images that are compiled into the .exe they are corrupted. > > > > You can see this for yourself. > > > > Original Java Runtime: http://3sp.com/Q38CEW924W/1.GIF > > > > Native Compiled .exe: http://3sp.com/Q38CEW924W/2.GIF > > > > Is this a known issue? >=20 > Yes, I recently stumbled over it myself. It seems that only GIFs have > the problem. I suggest to use PNGs instead of GIFs. >=20 >=20 > > To workaround the problem I thought it would be possible to reference a > > jar file instead of compiling it into the .exe as this jar file only > > contains image resources. However if I uncheck the relevant jar file in > > the archive section of the JNC GUI I get the following error on compile: > > > > creating "Agent.exe" for Windows > > - processing agent-resources.jar > > > > failed: > > java.io.FileNotFoundException: > > C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTempti0w8q.out\archive.a: The system > > cannot find the file specified. >=20 > If you uncheck the box, then only referenced classes will be used from > the jar. Since you've only resources in that jar, nothing will be pulled > in. This creates an error. You have to remove the jar completely from > the list. > But I think the image doesn't get corrupted during compilation. The > problem is at runtime. I tried to load my GIFs from the filesystem but > they painted wrong too (if I remember right)... >=20 >=20 > Marco >=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...> - 2006-12-21 19:18:02
|
Lee D. Painter wrote: > Thanks for the quick reply. > >> Do you compile for Windows or for Linux? > > I'm specifically trying to compile on Windows for this application. Yeah, on Windows, but on Windows for Linux or for Windows? It's all kind of confusing because you can crosscompile :-) But read below... >> Does that application run with a Sun 1.4 JRE or does it depend on 1.5 >> methods? > > Heh, well actually the code I'm compiling is designed to run with any > JVM 1.1 or above so I don't think that is the issue. > > I've just tested the AWT example and that compiles ok so it must be > something in my configuration. I was compiling from a set of jar files >>from our standard java build so I've changed to use source and there are > less warnings, in fact the only warnings I'm seeing now are from one of > the libraries we are using and again they are awt and swing methods. Do > you think there is an issue with linkage and compiling from jars? Yes, of course! I forgot to add some configuration for jar compiling! Thanks for pointing that out. I'll release a new Version tomorrow. You'll only need to update the GUI frontend, the huge compilers stay the same... In the mean time, just unpack the jars and compile from the directory with the extracted classes. I usually suggest to compile from classes instead of the sources anyway. > I don't know if it's relevant but I could get the same jars to compile > using the 0.9 version of NativeJ although that failed with > ClassNotFoundExceptions when AWT stuff was loaded. Yeah, AWT/Swing doesn't work in 0.9. > I'm going to get the source to this external library and compile it > directly, hopefully that will resolve the issue. Not needed as explained above. I hope it works by compiling from the classes... Marco |
From: Lee D. P. <le...@3s...> - 2006-12-21 19:50:21
|
Great, I look forward to the update. I've been able to compile from = source, but it would certainly be easier from jars as all the additonal = resources are packaged up correctly already.=20 =20 btw I'm compiling on Windows for Windows. =20 I'd like to be able to set some custom system properties in the .exe, I = know this is possible through gcj do you have plans to add this, or is = there some way I can do that now? =20 Regards =20 Lee ________________________________ From: jav...@li... on behalf of = Marco Trudel Sent: Thu 21/12/2006 19:17 To: A mailing list for general questions and discussions. Subject: Re: [javaCompiler-users] Request for AWT information Lee D. Painter wrote: > Thanks for the quick reply. > >> Do you compile for Windows or for Linux? > > I'm specifically trying to compile on Windows for this application. Yeah, on Windows, but on Windows for Linux or for Windows? It's all kind of confusing because you can crosscompile :-) But read below... >> Does that application run with a Sun 1.4 JRE or does it depend on 1.5 >> methods? > > Heh, well actually the code I'm compiling is designed to run with any > JVM 1.1 or above so I don't think that is the issue. >=20 > I've just tested the AWT example and that compiles ok so it must be > something in my configuration. I was compiling from a set of jar files >>from our standard java build so I've changed to use source and there = are > less warnings, in fact the only warnings I'm seeing now are from one = of > the libraries we are using and again they are awt and swing methods. = Do > you think there is an issue with linkage and compiling from jars? Yes, of course! I forgot to add some configuration for jar compiling! Thanks for pointing that out. I'll release a new Version tomorrow. You'll only need to update the GUI frontend, the huge compilers stay the same... In the mean time, just unpack the jars and compile from the directory with the extracted classes. I usually suggest to compile from classes instead of the sources anyway. > I don't know if it's relevant but I could get the same jars to compile > using the 0.9 version of NativeJ although that failed with > ClassNotFoundExceptions when AWT stuff was loaded. Yeah, AWT/Swing doesn't work in 0.9. > I'm going to get the source to this external library and compile it > directly, hopefully that will resolve the issue. Not needed as explained above. I hope it works by compiling from the classes... Marco -------------------------------------------------------------------------= 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= DEVDEV _______________________________________________ javaCompiler-users mailing list jav...@li... https://lists.sourceforge.net/lists/listinfo/javacompiler-users |
From: Marco T. <mt...@gm...> - 2006-12-21 20:09:29
|
Lee D. Painter wrote: > Great, I look forward to the update. I've been able to compile from source, All worked now? I assume you mean by the classes. Or did you download all sources? > but it would certainly be easier from jars as all the additonal resources > are packaged up correctly already. Of course. > btw I'm compiling on Windows for Windows. :-) > I'd like to be able to set some custom system properties in the .exe, > I know this is possible through gcj do you have plans to add this, > or is there some way I can do that now? What do you mean by "system properties"? Something you can get by System.getProperty("name")? Then just add a custom flag: -Dsome.property=foobar Or do you mean stuff like PATH or so? That's not possible. That's not possible with C applications as well (as far as I know)... Marco > > Regards > > Lee > ________________________________ > > From: jav...@li... on behalf of Marco Trudel > Sent: Thu 21/12/2006 19:17 > To: A mailing list for general questions and discussions. > Subject: Re: [javaCompiler-users] Request for AWT information > > > > Lee D. Painter wrote: >> Thanks for the quick reply. >> >>> Do you compile for Windows or for Linux? >> I'm specifically trying to compile on Windows for this application. > > Yeah, on Windows, but on Windows for Linux or for Windows? > It's all kind of confusing because you can crosscompile :-) > But read below... > > >>> Does that application run with a Sun 1.4 JRE or does it depend on 1.5 >>> methods? >> Heh, well actually the code I'm compiling is designed to run with any >> JVM 1.1 or above so I don't think that is the issue. >> >> I've just tested the AWT example and that compiles ok so it must be >> something in my configuration. I was compiling from a set of jar files >>> >from our standard java build so I've changed to use source and there are >> less warnings, in fact the only warnings I'm seeing now are from one of >> the libraries we are using and again they are awt and swing methods. Do >> you think there is an issue with linkage and compiling from jars? > > Yes, of course! I forgot to add some configuration for jar compiling! > Thanks for pointing that out. I'll release a new Version tomorrow. > You'll only need to update the GUI frontend, the huge compilers stay the > same... > In the mean time, just unpack the jars and compile from the directory > with the extracted classes. I usually suggest to compile from classes > instead of the sources anyway. > > >> I don't know if it's relevant but I could get the same jars to compile >> using the 0.9 version of NativeJ although that failed with >> ClassNotFoundExceptions when AWT stuff was loaded. > > Yeah, AWT/Swing doesn't work in 0.9. > > >> I'm going to get the source to this external library and compile it >> directly, hopefully that will resolve the issue. > > Not needed as explained above. I hope it works by compiling from the > classes... > > > Marco > > ------------------------------------------------------------------------- > 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 > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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 |