javacompiler-users Mailing List for javaCompiler (Page 6)
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: Jerome B. <jbe...@ya...> - 2007-03-30 07:34:03
|
Hi all, I tried to compile my java (1.5) project into a Win32 (XP) executable and get the error listed below. I compile a jar file with a main class that references other jar files (of my project or external like log4J). I use GCJ 4.2.0. Any idea my this does not work ? creating "UpdateLauncher.exe" for Windows - processing AdCafe-installer.jar - processing AdCafe-configuration.jar - processing AdCafe-updater.jar [D:\Software\Programming\gcc-119844-win\bin\gcj -fjni -O2 -Ilibs/win/gui/gui.jar -c C:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-updater.jar -o C:\DOCUME~1\KITE\LOCALS~1\Temp\JNCTemp8y3ps9.out\AdCafe-updater-win.jar.o -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jakarta-oro-2.0.8.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jdic_misc.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jRegistryKey.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\log4j-1.2.12.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-installer.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\commons-net-1.4.1.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-configuration.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jdic-native.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\ethermac.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-reporter.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe1.0.jar] - processing jdic-native.jar Warning: Nothing imported, JAR unused! - processing AdCafe-reporter.jar - processing AdCafe1.0.jar - main compilation step [D:\Software\Programming\gcc-119844-win\bin\gcj --main=cafe.main.UpdateLauncher -fjni -Djava.library.path=lib -Dsun.java2d.fontpath= -Djava.home=. -Djava.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment -Dawt.toolkit=sun.awt.windows.WToolkit -Dsun.io.unicode.encoding=UnicodeLittle -Llibs/win -Ilibs/win/gui/gui.jar -oC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\UpdateLauncher.exe -s -O2 -ljncTrial -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jakarta-oro-2.0.8.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jdic_misc.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jRegistryKey.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\log4j-1.2.12.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-installer.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\commons-net-1.4.1.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-configuration.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-updater.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\jdic-native.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\lib\ethermac.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe-reporter.jar -IC:\MesDocuments\_dev\CocoonWorkspace\NewCafeClient\distribution\AdCafe1.0.jar @C:\DOCUME~1\KITE\LOCALS~1\Temp\JNCTemp8y3ps9.out\SourceList8y3psf.list] C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x6d): undefined reference to `_ZN3org6apache5log4j6Logger9getLoggerEJPS2_PN4java4lang5ClassE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x459): undefined reference to `_ZN3org6apache5log4j20PropertyConfigurator9configureEJvPN4java4lang6StringE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x17b4): undefined reference to `cafe::configuration::Configurator::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x17d7): undefined reference to `cafe::configuration::Configurator::Configurator(cafe::AdCafeProperties*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x2662): undefined reference to `_ZN3org8jdesktop4jdic4misc16WallpaperFactory15createWallpaperEJPNS2_9WallpaperEv' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x26c2): undefined reference to `org::jdesktop::jdic::misc::Wallpaper::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x36aa): undefined reference to `cafe::configuration::Configurator::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x36cd): undefined reference to `cafe::configuration::Configurator::Configurator(cafe::AdCafeProperties*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.text+0x7d0d): undefined reference to `_ZN3org6apache5log4j6Logger9getLoggerEJPS2_PN4java4lang5ClassE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.data+0x44): undefined reference to `org::apache::log4j::Logger::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe-updater-win.jar.o:AdCafe-updater.jar:(.data+0x1844): undefined reference to `org::apache::log4j::Logger::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.text+0x6d): undefined reference to `_ZN3org6apache5log4j6Logger9getLoggerEJPS2_PN4java4lang5ClassE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.text+0x11a): undefined reference to `org::apache::commons::net::ftp::FTPClient::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.text+0x129): undefined reference to `org::apache::commons::net::ftp::FTPClient::FTPClient()' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.text+0x269): undefined reference to `org::apache::commons::net::ftp::FTPClient::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.text+0x279): undefined reference to `org::apache::commons::net::ftp::FTPClient::FTPClient()' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.text+0x5a0): undefined reference to `_ZN3org6apache7commons3net3ftp8FTPReply20isPositiveCompletionEJbi' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.data+0xa4): undefined reference to `org::apache::log4j::Logger::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.data+0x134): undefined reference to `org::apache::commons::net::ftp::FTPClient::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.rdata+0x4c): undefined reference to `org::apache::commons::net::MalformedServerReplyException::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.rdata+0x50): undefined reference to `org::apache::commons::net::io::CopyStreamException::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_JakartaFtpWrapper.class.o):JakartaFtpWrapper.class:(.rdata+0x60): undefined reference to `org::apache::commons::net::ftp::FTPConnectionClosedException::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x6d): undefined reference to `_ZN3org6apache5log4j6Logger9getLoggerEJPS2_PN4java4lang5ClassE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x177): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x185): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x19d): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1a6): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x27b): undefined reference to `ca::beq::util::win32::registry::RegistryValue::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x524): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x540): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_CURRENT_USER' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x594): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x5b0): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_CURRENT_USER' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x604): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x620): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_CURRENT_USER' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x6b5): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x6c1): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x6e0): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x6ec): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x80f): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x825): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_CURRENT_USER' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x834): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0xe2f): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0xe3c): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0xe76): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0xeac): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0xee2): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0xf18): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x10b9): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x10c5): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x10d1): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x10dd): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1142): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x11c2): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x136e): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x137a): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1386): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1392): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1424): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x14a4): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x152e): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x15a4): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1719): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1725): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1731): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x173d): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x17a2): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1822): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1a16): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1a29): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1a42): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1a54): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1bf8): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1c08): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1c1a): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1ce7): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1db3): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1dca): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_USERS' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x1e5c): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2b06): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2b12): undefined reference to `ca::beq::util::win32::registry::RootKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2b2a): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2b33): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2b76): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2b8e): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2b97): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2bd9): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2bf1): undefined reference to `ca::beq::util::win32::registry::RootKey::HKEY_LOCAL_MACHINE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2bfa): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2c4f): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2c6c): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2d98): undefined reference to `ca::beq::util::win32::registry::RegistryValue::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2e99): undefined reference to `ca::beq::util::win32::registry::RegistryKey::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2eb6): undefined reference to `ca::beq::util::win32::registry::RegistryKey::RegistryKey(ca::beq::util::win32::registry::RootKey*, java::lang::String*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x2f58): undefined reference to `ca::beq::util::win32::registry::RegistryValue::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x3033): undefined reference to `ca::beq::util::win32::registry::RegistryValue::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x303f): undefined reference to `ca::beq::util::win32::registry::ValueType::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x304e): undefined reference to `ca::beq::util::win32::registry::ValueType::REG_SZ' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x3065): undefined reference to `ca::beq::util::win32::registry::RegistryValue::RegistryValue(java::lang::String*, ca::beq::util::win32::registry::ValueType*, java::lang::Object*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x3125): undefined reference to `ca::beq::util::win32::registry::RegistryValue::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x3131): undefined reference to `ca::beq::util::win32::registry::ValueType::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x3144): undefined reference to `ca::beq::util::win32::registry::ValueType::REG_SZ' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.text+0x3157): undefined reference to `ca::beq::util::win32::registry::RegistryValue::RegistryValue(java::lang::String*, ca::beq::util::win32::registry::ValueType*, java::lang::Object*)' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_RegistryUtil.class.o):RegistryUtil.class:(.data+0x44): undefined reference to `org::apache::log4j::Logger::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_NetUtil.class.o):NetUtil.class:(.text+0x6d): undefined reference to `_ZN3org6apache5log4j6Logger9getLoggerEJPS2_PN4java4lang5ClassE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_NetUtil.class.o):NetUtil.class:(.text+0x258): undefined reference to `org::imagimate::mac::EtherMAC::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_NetUtil.class.o):NetUtil.class:(.text+0x26f): undefined reference to `org::imagimate::mac::EtherMAC::EtherMAC()' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_NetUtil.class.o):NetUtil.class:(.text+0x2c9): undefined reference to `_ZN3org9imagimate3mac8EtherMAC8toStringEJPN4java4lang6StringEP6JArrayIiE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_NetUtil.class.o):NetUtil.class:(.data+0x44): undefined reference to `org::apache::log4j::Logger::class$' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_EncryptedFileHandler.class.o):EncryptedFileHandler.class:(.text+0xb5): undefined reference to `_ZN3org6apache5log4j6Logger9getLoggerEJPS2_PN4java4lang5ClassE' C:/DOCUME~1/KITE/LOCALS~1/Temp/JNCTemp8y3ps9.out/AdCafe1.0-win.jar.a(cafe_util_EncryptedFileHandler.class.o):EncryptedFileHandler.class:(.data+0x64): undefined reference to `org::apache::log4j::Logger::class$' collect2: ld returned 1 exit status failed... Jerome Benezech jbe...@ya... |
From: Marco T. <mt...@gm...> - 2007-03-27 10:15:36
|
Hey Tahir Please always hit "reply all", otherwise we'll loose the mailing list. tahir malik wrote: > thank you marco for replying , > > as i told you that i am using 4 reference jar files and one main > application jar file > > so 4 jars are lib jars and main jar needs them to execute > > so in first step i can include in either way as given like as class > files , as working directory or add as a jar file . > > please correct me as if i am wrong Sounds good... > so i added my application as all jars, 4 lib jars and checked so only > ref class are added in binary and my main jar (EtradeExpress.jar a > desktop swing application) . > > > is this correct and when i complied at last step it gives me error > > creating "ETradePlus.exe" for Windows > - processing connectdb.jar > - processing EtradeExpress.jar > iridiumplus/com/ETradeQuotes.java: In class > 'iridiumplus.com.ETradeQuotes$5': > iridiumplus/com/ETradeQuotes.java: In method > 'iridiumplus.com.ETradeQuotes$5.actionPerformed(java.awt.event.ActionEvent)': > iridiumplus/com/ETradeQuotes.java:290: error: class > 'iridiumplus.com.ETradeQuotes' has no method named 'access$5000971' > matching signature > '(Liridiumplus/com/ETradeQuotes;Ljava/awt/event/ActionEvent;)V' > iridiumplus/com/ETradeQuotes.java:290: confused by earlier errors, > bailing out > > failed... You already told me that and I already answered: "Can you send me that jar? At a glance, this looks like a GCJ bug.". Marco |
From: Marco T. <mt...@gm...> - 2007-03-26 11:08:10
|
tahir malik wrote: > > > hi , > > I am new to javacompiler and this forum. Actually the project is called JavaNativeCompiler or JNC as abbreviation. At first, I named it javacompiler but found it imprecise and changed it. So the mailinglists still have the old one... > i am making a swing desktop application > > using properties files for internationalization > > > > I have 5 reference jar files and one main application jar file > > The images are also in main jar file. > > I am confused in the java compiler wizard first step. What are you confused in? > And also about the checking of jars what does it mean Did you read the manual? > If I add all jar file in 1^st step and after selecting main class and > then compile then it gives me awt error > > - processing EtradeExpress.jar > iridiumplus/com/ETradeQuotes.java: In class > 'iridiumplus.com.ETradeQuotes$5': > iridiumplus/com/ETradeQuotes.java: In method > 'iridiumplus.com.ETradeQuotes$5.actionPerformed(java.awt.event.ActionEvent)': > iridiumplus/com/ETradeQuotes.java:290: error: class > 'iridiumplus.com.ETradeQuotes' has no method named 'access$5000971' > matching signature > '(Liridiumplus/com/ETradeQuotes;Ljava/awt/event/ActionEvent;)V' > iridiumplus/com/ETradeQuotes.java:290: confused by earlier errors, > bailing out Can you send me that jar? At a glance, this looks like a GCJ bug. thanks Marco |
From: tahir m. <tah...@ho...> - 2007-03-26 10:59:09
|
<html><div style='background-color:'><DIV class=RTE> <P> </P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">hi ,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"> I am new to javacompiler and this forum.<o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">i am making a swing desktop application <o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">using properties files for internationalization<o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">I have 5 reference jar files and one main application jar file <o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">The images are also in main jar file.<o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">I am confused in the java compiler wizard first step.<o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">And also about the checking of jars what does it mean <o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">If I add all jar file in 1<SUP>st</SUP> step and after selecting main class and then compile then it gives me <SPAN style="mso-spacerun: yes"> </SPAN>awt error <o:p></o:p></SPAN></P> <P style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">- processing EtradeExpress.jar<BR> iridiumplus/com/ETradeQuotes.java: In class 'iridiumplus.com.ETradeQuotes$5':<BR> iridiumplus/com/ETradeQuotes.java: In method 'iridiumplus.com.ETradeQuotes$5.actionPerformed(java.awt.event.ActionEvent)':<BR> iridiumplus/com/ETradeQuotes.java:290: error: class 'iridiumplus.com.ETradeQuotes' has no method named 'access$5000971' matching signature '(Liridiumplus/com/ETradeQuotes;Ljava/awt/event/ActionEvent;)V'<BR> iridiumplus/com/ETradeQuotes.java:290: confused by earlier errors, bailing out</SPAN></P> <P style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">SO THANK YOU IN ADVANCE <o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">Kind regards <o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">Tahir <o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P> <P><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes"> </SPAN> <o:p></o:p></SPAN></P> <P class=MsoNormal><o:p> </o:p></P> <DIV></DIV><FONT color=#000000></DIV> <DIV></DIV></FONT></div></html> |
From: Marco T. <mt...@gm...> - 2007-03-06 17:25:38
|
Friedhelm Hellerhoff wrote: > How do I have to load images for buttons etc? There shouldn't be a difference between native compiled apps and apps running in a JVM. Just make sure you compiled all resources into the binary. You seem to have done that... > I have seen in the FAQ, that I have to put them into a > separate jar and compile it as complete jar. > So I have put all resources in my src folder into a > jar that is used in the *.jnc file. Sounds good. Does that work when running in a JVM? Please make sure the JVM also uses the JAR and not the files from the filesystem. > The loading of images is done i.e. by > shell.setImage(SWTResourceManager.getImage(PictureMover.class, > "/de/fh/pictureMover/images/checkin_action.gif")); Please check if it works in a usual JVM. If not, you should consult the documentation of SWTResourceManager or ask Google on how to load resources from a Jar. Also you could check my examples (FileEncrypter or LittleUniverse) or JNC [1] itself. If it does work in a JVM, then it's a bug in GCJ/JNC. In this case, please send me a minimal example that works in a JVM but fails when native compiled. thanks Marco 1: http://javacompiler.svn.sourceforge.net/viewvc/javacompiler/trunk/src/ch/mtSystems/jnc/view/JNC.java?view=markup (Method "public static Image loadImage(String s)") |
From: Friedhelm H. <fhe...@ya...> - 2007-03-06 16:55:54
|
How do I have to load images for buttons etc? I have seen in the FAQ, that I have to put them into a separate jar and compile it as complete jar. So I have put all resources in my src folder into a jar that is used in the *.jnc file. The loading of images is done i.e. by shell.setImage(SWTResourceManager.getImage(PictureMover.class, "/de/fh/pictureMover/images/checkin_action.gif")); But that does not work. How do I have to load the images? Thanks in advance, fridi ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: Marco T. <mt...@gm...> - 2007-02-24 09:58:53
|
Kirill Kryticki wrote: > Hi!. I have example of application with drag and drop features. After > compilation by JNC next exception is thrown when I try to drag some label: > Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException > at java.nio.charset.CharsetEncoder.encode(Test.exe) > at gnu.gcj.convert.CharsetToBytesAdaptor.write(Test.exe) > at java.io.UnsupportedEncodingException.<init>(Test.exe) > at gnu.gcj.convert.Output_iconv .<init>(Test.exe) > at java.lang.String.getBytes(Test.exe) > at sun.awt.datatransfer.DataTransferer.isEncodingSupported(Test.exe) > at sun.awt.datatransfer.DataTransferer.isFlavorCharsetTextType(Test.exe ) > at sun.awt.datatransfer.DataTransferer.isFlavorCharsetTextType(Test.exe) > at sun.awt.datatransfer.DataTransferer.getFormatsForFlavors(Test.exe) > at sun.awt.datatransfer.DataTransferer.getFormatsForFlavors (Test.exe) > at java.awt.Component.processMouseMotionEvent(Test.exe) > at java.awt.Component.processMouseMotionEvent(Test.exe) > at java.awt.Component.processEvent(Test.exe) > at java.awt.Component.processEvent (Test.exe) > at java.awt.Component.dispatchEventImpl(Test.exe) > at java.awt.Component.dispatchEventImpl(Test.exe) > at java.awt.Component.dispatchEvent(Test.exe) > at java.awt.Component.dispatchEvent(Test.exe ) > at java.awt.LightweightDispatcher.processMouseEvent(Test.exe) > at java.awt.LightweightDispatcher.processMouseEvent(Test.exe) > at java.awt.Container.dispatchEventImpl(Test.exe) > at java.awt.Container.dispatchEventImpl (Test.exe) > at java.awt.Component.dispatchEvent(Test.exe) > at java.awt.Component.dispatchEvent(Test.exe) > at java.awt.Container.dispatchEventImpl(Test.exe) Fixed. Will be in the next release (which will probably be tomorrow). Marco |
From: Marco T. <mt...@gm...> - 2007-02-21 10:16:16
|
Lee D. Painter wrote: >>> Yesterday something else started happening, it started to compile >>> without getting stuck when using it through the JNC 1.1 GUI but the > link >>> fails with multiple definition errors again (see below). This seems > to >>> have no pattern as sometimes it compiles and others it gets stuck as > per >>> the original problem. I did change some virtual memory settings > before >>> this happened though but when monitoring the compile everything > seems to >>> be within limits. >> Hmmm... If it works now, I'd suggest we blame the memory (swap) and go >> on with life... After all, I never had problems compiling SWT. > > I'm hoping this is limited to the one workstation and I'll do some > testing on our actual automated build machines. Compiled jars are cached (unless you removed that flag). So just ensure that the compilation runs through the first time. >> Since 1.1, the package java.text is also excluded if you check the >> "exclude gui" box. Your code depends on it... Either change the code > or >> uncheck the "exclude gui" box. >> There's a faq entry on the homepage about these "multiple definition" >> errors if you're interested... > > Right that makes sense as to why it fails but I was unaware that > java.text was excluded in 1.1 and not 1.0.1 It's listed in the GUI at the "Exclude GUI" option. > and there is no indication > of that in the FAQ. No, but a description of why "multiple definition" errors occur and that it is because of "Exclude GUI" or "Exclude JCE". > Should that be considered as part of the GUI? It has > date formats and i18n stuff which can be used outside of Swing and AWT. Actually you're right. But I added it because I had to take it from a Sun JRE because the GNU Classpath one is broken. So, if you exclude the GUI, you're sure that you do not have to follow the Sun license. > I've now turned off the excluded GUI flag but now I have a 6MB exe with > 1.1 instead of 2.3 MB with 1.0.1. So this really does not help in my > case as 6MB is not an acceptable size given that it is includes > AWT/Swing when we don't even use it. See, size matters ;-) Well, just find the part that uses java.text and remove/recode it. > Download size is quite important > for this application and is one of the reasons we spent the time > converting to SWT in the first place :( Shouldn't be too complicated to get that working... Marco |
From: Lee D. P. <le...@3s...> - 2007-02-21 10:00:15
|
> > Yesterday something else started happening, it started to compile > > without getting stuck when using it through the JNC 1.1 GUI but the link > > fails with multiple definition errors again (see below). This seems to > > have no pattern as sometimes it compiles and others it gets stuck as per > > the original problem. I did change some virtual memory settings before > > this happened though but when monitoring the compile everything seems to > > be within limits. >=20 > Hmmm... If it works now, I'd suggest we blame the memory (swap) and go > on with life... After all, I never had problems compiling SWT. I'm hoping this is limited to the one workstation and I'll do some testing on our actual automated build machines. > Since 1.1, the package java.text is also excluded if you check the > "exclude gui" box. Your code depends on it... Either change the code or > uncheck the "exclude gui" box. > There's a faq entry on the homepage about these "multiple definition" > errors if you're interested... Right that makes sense as to why it fails but I was unaware that java.text was excluded in 1.1 and not 1.0.1 and there is no indication of that in the FAQ. Should that be considered as part of the GUI? It has date formats and i18n stuff which can be used outside of Swing and AWT. I've now turned off the excluded GUI flag but now I have a 6MB exe with 1.1 instead of 2.3 MB with 1.0.1. So this really does not help in my case as 6MB is not an acceptable size given that it is includes AWT/Swing when we don't even use it. Download size is quite important for this application and is one of the reasons we spent the time converting to SWT in the first place :( Lee |
From: Marco T. <mt...@gm...> - 2007-02-21 07:48:15
|
Lee D. Painter wrote: > Marco, > >>> All of the jar files are compiled as a whole except swt.jar which is >>> references only. >> Can you try a compilation with reference only by starting JNC by > running >> "autocompiler -debug"? This will start the gui but keep the console > open >> and print exceptions if any... > > I tried this and I see no additional exceptions in the console. > > Yesterday something else started happening, it started to compile > without getting stuck when using it through the JNC 1.1 GUI but the link > fails with multiple definition errors again (see below). This seems to > have no pattern as sometimes it compiles and others it gets stuck as per > the original problem. I did change some virtual memory settings before > this happened though but when monitoring the compile everything seems to > be within limits. Hmmm... If it works now, I'd suggest we blame the memory (swap) and go on with life... After all, I never had problems compiling SWT. > The same project file executed above compiles and links correctly in > 1.0.1 without modification. This is rather quite confusing :( > > Lee > > ----- > > c:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- > mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function > `ZN4java4text8Collator11getInstanceEJPS1_PNS_4util6LocaleE':D:/programmi > ng/jnc/libs/gui/win/java/text/Collator.java:255: 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:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- > mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function > `ZN4java4text8CollatorC1Ev':D:/programming/jnc/libs/gui/win/java/text/Co > llator.java:453: multiple definition of > `java::text::Collator::Collator()' Since 1.1, the package java.text is also excluded if you check the "exclude gui" box. Your code depends on it... Either change the code or uncheck the "exclude gui" box. There's a faq entry on the homepage about these "multiple definition" errors if you're interested... Marco |
From: Lee D. P. <le...@3s...> - 2007-02-20 19:41:14
|
Marco, > > All of the jar files are compiled as a whole except swt.jar which is > > references only. >=20 > Can you try a compilation with reference only by starting JNC by running > "autocompiler -debug"? This will start the gui but keep the console open > and print exceptions if any... I tried this and I see no additional exceptions in the console.=20 Yesterday something else started happening, it started to compile without getting stuck when using it through the JNC 1.1 GUI but the link fails with multiple definition errors again (see below). This seems to have no pattern as sometimes it compiles and others it gets stuck as per the original problem. I did change some virtual memory settings before this happened though but when monitoring the compile everything seems to be within limits. The same project file executed above compiles and links correctly in 1.0.1 without modification. This is rather quite confusing :( Lee=20 ----- c:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function `ZN4java4text8Collator11getInstanceEJPS1_PNS_4util6LocaleE':D:/programmi ng/jnc/libs/gui/win/java/text/Collator.java:255: multiple definition of `java::text::Collator* java::text::Collator::getInstance(java::util::Locale*)' libs/win/libjncNoGui.a:ccuecaaa.jar:(.text+0x840): first defined here =09 c:/workspace.head/build-tools/jnc/gcc-121694-win/bin/../lib/gcc/i686-pc- mingw32/4.3.0/../../../libgcj.a(gui_java_text.o): In function `ZN4java4text8CollatorC1Ev':D:/programming/jnc/libs/gui/win/java/text/Co llator.java:453: multiple definition of `java::text::Collator::Collator()' |
From: Marco T. <mt...@gm...> - 2007-02-20 13:04:05
|
Steven Blade wrote: > >package ch.mtSystems.jnc.model.utilities; > *and the package declaration should be the same as you gave me right ?i > just create this class in my project in this package after adding the > gnu jar and that's it.* > *but no support for writing xml yet , oh well.* The bug why your XML writing failed was fixed in GNU classpath and I imported it into GCJ. So it will work with the next version of JNC... Marco > *Maroc thanks alot for your time man, if you have any other suggestions > please tell me .* > *Thanks* > > On 2/15/07, *Marco Trudel* <mt...@gm... <mailto:mt...@gm...>> wrote: > > Please always do "reply all", else we loose the mailinglist... > > > Steven Blade wrote: > > ok sure thing but please show me where to use the static block of > code ok. > > Thanks for the sample. Just put that code in an own class (as the > attached XmlLoader.java) and add this class to the JNC compilation > source. This will ensure that the needed objects are pulled into the > binary. > You do not have to change your source. > > > > did it work both ways with you reading and transforming xml ? > > Reading works, writing (transforming) fails. I'll create a bugreport > (it's probably a GNU classpath bug) and hope that the fix will be in JNC > 1.2. > > > one more thing does that mean i have to use gnu's jar instead of > java's ? > > No, you only have to ensure that your binary contains the xml stuff. > This is done with the static initializer since it references the xml > stuff and thus ld - the linker - will add them. > > > Marco > > > > import java.io.BufferedReader; > > import java.io.File; > > import java.io.InputStreamReader; > > > > import javax.xml.parsers.SAXParser; > > import javax.xml.parsers.SAXParserFactory; > > import javax.xml.transform.OutputKeys; > > import javax.xml.transform.Transformer ; > > import javax.xml.transform.sax.SAXTransformerFactory; > > import javax.xml.transform.sax.TransformerHandler; > > import javax.xml.transform.stream.StreamResult; > > > > import org.xml.sax.Attributes ; > > import org.xml.sax.SAXException; > > import org.xml.sax.helpers.AttributesImpl; > > import org.xml.sax.helpers.DefaultHandler; > > > > > > public class Foo extends DefaultHandler{ > > > > /** > > * @param args > > */ > > private static File file; > > private static String contents; > > private static Foo f=new Foo(); > > public static void main(String[] args) { > > // TODO Auto-generated method stub > > System.out.print("enter location of xml file to > read "); > > BufferedReader input=new BufferedReader(new > InputStreamReader( System.in <http://System.in>)); > > try > > { > > String sfile=input.readLine(); > > file=new File(sfile); > > readXml(); > > System.out.print(contents); > > writeXml(); > > }catch(Exception _){_.printStackTrace();} > > } > > private static void writeXml() > > { > > SAXTransformerFactory > factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > > try{ > > StreamResult stream=new StreamResult(System.out); > > TransformerHandler handler= > factory.newTransformerHandler(); > > Transformer trans=handler.getTransformer(); > > trans.setOutputProperty (OutputKeys.ENCODING,"ISO-8859-1"); > > trans.setOutputProperty (OutputKeys.INDENT,"yes"); > > handler.setResult(stream); > > handler.startDocument(); > > AttributesImpl atts=new AttributesImpl(); > > handler.startElement("", "", "test", atts); > > atts.clear(); > > handler.startElement("", "", "foo", atts); > > handler.characters(new char[]{'a','b','c'}, 0, 3); > > handler.endElement("", "", "foo"); > > handler.endElement("", "", "test"); > > handler.endDocument(); > > }catch(Exception _){_.printStackTrace();} > > } > > > > private static void readXml() > > { > > System.out.println("reading xml..."); > > try{ > > SAXParserFactory factory= > SAXParserFactory.newInstance(); // the exception points to this line > > factory.setValidating(false); > > SAXParser parser=factory.newSAXParser(); > > parser.parse (file, f.new OwnHandler()); > > } > > catch(Exception _){_.printStackTrace();} > > } > > > > private class OwnHandler extends DefaultHandler{ > > > > public void startElement(String namespaceURI, > > String sName, > > String qName, > > Attributes attrs) throws SAXException{ > > contents+="<"+qName+">"; > > } > > public void endElement(String uri, String localName, > String qName) throws SAXException{ > > contents+="<"+qName+"/>"; > > } > > public void characters(char[] buf,int offset,int > length)throws SAXException{ > > contents+=new String(buf,offset,length); > > } > > } > > } > > > > > > > > > > > ------------------------------------------------------------------------ > > > > <?xml version=1.0 encoding=UTF-8?> > > <test> > > <line>testing java native compiler</line> > > </test> > > > package ch.mtSystems.jnc.model.utilities; > > public class XmlLoader > { > static > { > gnu.xml.dom.ls.SAXEventSink.class.getName(); > gnu.xml.transform.TransformerFactoryImpl.class.getName(); > gnu.xml.xpath.XPathFactoryImpl.class.getName(); > org.xml.sax.ContentHandler.class.getName(); > gnu.xml.stream.SAXParserFactory.class.getName (); > } > } > > > > > -- > kc |
From: Marco T. <mt...@gm...> - 2007-02-19 14:29:15
|
Lee D. Painter wrote: >>> The compile never completed. The JNC window just stayed with the > text >>> below (I had set the flag to output commands btw and these were not >>> output) >>> >>> : processing swt-win32.jar >> You might run out of RAM/Swap. GCJ 4.3 needs a lot more compared to > GCJ >> 4.2. I can compile swt without problems. >> What operating system do you have? >> How much Ram? >> How do you compile the jar? The whole or only needed references? >> > > This is a Windows XP Service Pack 2 machine with 1 GB memory. Should work... I have the same setup and can compile swt for references only... > All of the jar files are compiled as a whole except swt.jar which is > references only. Can you try a compilation with reference only by starting JNC by running "autocompiler -debug"? This will start the gui but keep the console open and print exceptions if any... >>> I started the build just as I was leaving for the office yesterday >>> morning and it was still at that point 8 hours later. I didn't try >>> without optimization; >> Would be nice to know the result with optimization. >>> There were no processes running except the JavaNativeCompiler.exe. >>> Normally when compiling I see quite a bit of activity in the task >>> manager with jc1, gcj, ar or cc1. >> Very strange! The GUI frontend calls "gcj" and waits until it returns. >> So there really ought to be something... Unless you run out of memory > of >> course. Then the behavior is unspecified I guess. >> > > I've now run a few more builds and have a bit more information. I can > successfully compile SWT if I compile the whole jar but of course this > has linking issues with AWT. This produces the following output in the > log. > > [exec] - processing swt-win32.jar > [exec] [gcc-121694-win\bin\gcj > [exec] -fjni > [exec] -O2 > [exec] -Ilibs/win/gui/gui.jar > [exec] -c > [exec] ..\..\sslexplorer-agent\build\extension\swt-win32.jar > [exec] -o > [exec] > C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTemp2ogdqu.out\swt-win32-win.jar.o > [exec] -I..\..\sslexplorer-agent\build\extension\nanoxml-2.2.3.jar > [exec] -I..\..\sslexplorer-agent\build\extension\agent-debug.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\maverick-ssl-debug.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\maverick-crypto.jar > [exec] -I..\..\sslexplorer-agent\build\extension\agent-en.jar > [exec] -I..\..\sslexplorer-agent\build\extension\agent-swt-en.jar > [exec] -I..\..\sslexplorer-agent\build\extension\log4j-java1.1.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\commons-logging-java1.1.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\maverick-util-debug.jar > [exec] -I..\..\sslexplorer-agent\build\extension\jRegistryKey.jar > [exec] -I..\..\sslexplorer-agent\build\extension\jzlib.jar > [exec] > -I..\..\sslexplorer-agent\build\extension\agent-swt-debug.jar] > > The problem seems to be when I have the swt.jar set to references only. > When I have this option, with or without optimization I only get the > following output in the log. > > [exec] - processing swt-win32.jar Well, that would print tons of messages if this printed the used commands. Therefore I disabled them. > I'm not sure if that's a clue but I never see the command output as the > successful compile above shows. This is using the same .jnc file with > the only difference being that the jar flag is unset to include > referenced classes only. Thats ok and intended. > Memory usage seems to be within the available limits. I'll try > increasing the virtual memory to see if that makes a difference. Actually, compiling in references only mode should use way less ram than compiling the complete jar. So this shouldn't be the cause here. Marco |
From: Lee D. P. <le...@3s...> - 2007-02-19 11:03:28
|
> > > > The compile never completed. The JNC window just stayed with the text > > below (I had set the flag to output commands btw and these were not > > output) > > > > : processing swt-win32.jar >=20 > You might run out of RAM/Swap. GCJ 4.3 needs a lot more compared to GCJ > 4.2. I can compile swt without problems. > What operating system do you have? > How much Ram? > How do you compile the jar? The whole or only needed references? >=20 This is a Windows XP Service Pack 2 machine with 1 GB memory.=20 All of the jar files are compiled as a whole except swt.jar which is references only.=20 > > I started the build just as I was leaving for the office yesterday > > morning and it was still at that point 8 hours later. I didn't try > > without optimization; >=20 > Would be nice to know the result with optimization. > > > > There were no processes running except the JavaNativeCompiler.exe. > > Normally when compiling I see quite a bit of activity in the task > > manager with jc1, gcj, ar or cc1. >=20 > Very strange! The GUI frontend calls "gcj" and waits until it returns. > So there really ought to be something... Unless you run out of memory of > course. Then the behavior is unspecified I guess. > I've now run a few more builds and have a bit more information. I can successfully compile SWT if I compile the whole jar but of course this has linking issues with AWT. This produces the following output in the log. [exec] - processing swt-win32.jar [exec] [gcc-121694-win\bin\gcj [exec] -fjni [exec] -O2 [exec] -Ilibs/win/gui/gui.jar [exec] -c [exec] ..\..\sslexplorer-agent\build\extension\swt-win32.jar [exec] -o [exec] C:\DOCUME~1\lee\LOCALS~1\Temp\JNCTemp2ogdqu.out\swt-win32-win.jar.o [exec] -I..\..\sslexplorer-agent\build\extension\nanoxml-2.2.3.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-debug.jar [exec] -I..\..\sslexplorer-agent\build\extension\maverick-ssl-debug.jar [exec] -I..\..\sslexplorer-agent\build\extension\maverick-crypto.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-en.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-swt-en.jar [exec] -I..\..\sslexplorer-agent\build\extension\log4j-java1.1.jar [exec] -I..\..\sslexplorer-agent\build\extension\commons-logging-java1.1.jar [exec] -I..\..\sslexplorer-agent\build\extension\maverick-util-debug.jar [exec] -I..\..\sslexplorer-agent\build\extension\jRegistryKey.jar [exec] -I..\..\sslexplorer-agent\build\extension\jzlib.jar [exec] -I..\..\sslexplorer-agent\build\extension\agent-swt-debug.jar] The problem seems to be when I have the swt.jar set to references only. When I have this option, with or without optimization I only get the following output in the log. [exec] - processing swt-win32.jar I'm not sure if that's a clue but I never see the command output as the successful compile above shows. This is using the same .jnc file with the only difference being that the jar flag is unset to include referenced classes only. Memory usage seems to be within the available limits. I'll try increasing the virtual memory to see if that makes a difference.=20 Thanks, Lee |
From: Marco T. <mt...@gm...> - 2007-02-19 07:15:06
|
Lee D. Painter wrote: >>> If I attempt to compile the same project with 1.1 it hangs when >>> processing the swt.jar. >> This is a whole new topic. What do you mean by hang? >> Is there an output? How long did you wait? Did you try without >> optimization? > > The compile never completed. The JNC window just stayed with the text > below (I had set the flag to output commands btw and these were not > output) > > : processing swt-win32.jar You might run out of RAM/Swap. GCJ 4.3 needs a lot more compared to GCJ 4.2. I can compile swt without problems. What operating system do you have? How much Ram? How do you compile the jar? The whole or only needed references? > I started the build just as I was leaving for the office yesterday > morning and it was still at that point 8 hours later. I didn't try > without optimization; Would be nice to know the result with optimization. > I tried a few more builds directly with auto > compiler with the same results AutoCompiler actually only executes "JavaNativeCompiler -compile theFile.jnc" while keeping the console open. So, not really surprising :-) > last night so decided to leave it at that > and continue testing with 1.0.1 which continued to build within 10-15 > mins. If I get time I'll upgrade again and try some different options to > see if I can isolate the problem. > >>> There is no trace of any gcj or related >>> processes in task manager when this happens. >> I think cc1.exe or jc1.exe should be in the process list. Just look > for >> the process consuming the most memory or/and cpu. > > There were no processes running except the JavaNativeCompiler.exe. > Normally when compiling I see quite a bit of activity in the task > manager with jc1, gcj, ar or cc1. Very strange! The GUI frontend calls "gcj" and waits until it returns. So there really ought to be something... Unless you run out of memory of course. Then the behavior is unspecified I guess. Marco |
From: Lee D. P. <le...@3s...> - 2007-02-18 21:07:11
|
>=20 > > If I attempt to compile the same project with 1.1 it hangs when > > processing the swt.jar. >=20 > This is a whole new topic. What do you mean by hang? > Is there an output? How long did you wait? Did you try without > optimization? The compile never completed. The JNC window just stayed with the text below (I had set the flag to output commands btw and these were not output) : processing swt-win32.jar I started the build just as I was leaving for the office yesterday morning and it was still at that point 8 hours later. I didn't try without optimization; I tried a few more builds directly with auto compiler with the same results last night so decided to leave it at that and continue testing with 1.0.1 which continued to build within 10-15 mins. If I get time I'll upgrade again and try some different options to see if I can isolate the problem. >=20 > > There is no trace of any gcj or related > > processes in task manager when this happens. >=20 > I think cc1.exe or jc1.exe should be in the process list. Just look for > the process consuming the most memory or/and cpu. There were no processes running except the JavaNativeCompiler.exe. Normally when compiling I see quite a bit of activity in the task manager with jc1, gcj, ar or cc1.=20 Lee |
From: Marco T. <mt...@gm...> - 2007-02-18 18:16:36
|
Lee D. Painter wrote: > Marco, > >>>> Harpal Grover wrote: >>>>> I downloaded the latest JNC, 1.1, and attempted to compile my java >>>>> app to a native app. The compilation started, but after awhile >>>>> stopped working and JNC just hung, with the following log output: >>>> Did you mix .java and .class source files? >>>> Does it work with JNC 1.0? > > I've experienced a similar problem after upgrading to 1.1. I setup my > project in 1.0.1 and it compiles fine, this is using mixed src and jar > files. That's no problem. Only mixing .java and .class files is a problem. > If I attempt to compile the same project with 1.1 it hangs when > processing the swt.jar. This is a whole new topic. What do you mean by hang? Is there an output? How long did you wait? Did you try without optimization? > There is no trace of any gcj or related > processes in task manager when this happens. I think cc1.exe or jc1.exe should be in the process list. Just look for the process consuming the most memory or/and cpu. Marco |
From: Lee D. P. <le...@3s...> - 2007-02-18 18:04:56
|
Marco, > >> Harpal Grover wrote: > >>> I downloaded the latest JNC, 1.1, and attempted to compile my java > >>> app to a native app. The compilation started, but after awhile > >>> stopped working and JNC just hung, with the following log output: > >> > >> Did you mix .java and .class source files? > >> Does it work with JNC 1.0? > > I've experienced a similar problem after upgrading to 1.1. I setup my project in 1.0.1 and it compiles fine, this is using mixed src and jar files. If I attempt to compile the same project with 1.1 it hangs when processing the swt.jar. There is no trace of any gcj or related processes in task manager when this happens. Regards Lee |
From: Marco T. <mt...@gm...> - 2007-02-18 10:50:25
|
Kirill Kryticki wrote: > Hi!. I have example of application with drag and drop features. After > compilation by JNC next exception is thrown when I try to drag some label: > Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException > at java.nio.charset.CharsetEncoder.encode(Test.exe) > at gnu.gcj.convert.CharsetToBytesAdaptor.write(Test.exe) > at java.io.UnsupportedEncodingException.<init>(Test.exe) > at gnu.gcj.convert.Output_iconv .<init>(Test.exe) > at java.lang.String.getBytes(Test.exe) > at sun.awt.datatransfer.DataTransferer.isEncodingSupported(Test.exe) > at sun.awt.datatransfer.DataTransferer.isFlavorCharsetTextType(Test.exe ) > at sun.awt.datatransfer.DataTransferer.isFlavorCharsetTextType(Test.exe) > at sun.awt.datatransfer.DataTransferer.getFormatsForFlavors(Test.exe) > at sun.awt.datatransfer.DataTransferer.getFormatsForFlavors (Test.exe) > at java.awt.Component.processMouseMotionEvent(Test.exe) > at java.awt.Component.processMouseMotionEvent(Test.exe) > at java.awt.Component.processEvent(Test.exe) > at java.awt.Component.processEvent (Test.exe) > at java.awt.Component.dispatchEventImpl(Test.exe) > at java.awt.Component.dispatchEventImpl(Test.exe) > at java.awt.Component.dispatchEvent(Test.exe) > at java.awt.Component.dispatchEvent(Test.exe ) > at java.awt.LightweightDispatcher.processMouseEvent(Test.exe) > at java.awt.LightweightDispatcher.processMouseEvent(Test.exe) > at java.awt.Container.dispatchEventImpl(Test.exe) > at java.awt.Container.dispatchEventImpl (Test.exe) > at java.awt.Component.dispatchEvent(Test.exe) > at java.awt.Component.dispatchEvent(Test.exe) > at java.awt.Container.dispatchEventImpl(Test.exe) Yes, I see. Also the needed cursor images are not bundled with JNC 1.1. > I tried to use standard java libs with compilation( charsets.jar - with > some classes from another libs) but compilation of charsets.jar failed > (without logs of errors). Well, that's unfortunately not a simple problem such as a missing class. This is just a good reason why AWT/Swing support is still experimental. Please use SWT if you can. It compiles flawless, looks better and runs faster :-) > Java source application attached Thanks for that! I always appreciate AWT/Swing examples since I only have some minor small ones. I'll see to it that it will work in JNC 1.2. Marco |
From: Marco T. <mt...@gm...> - 2007-02-18 10:21:15
|
Harpal Grover wrote: > > > >> From: Marco Trudel <mt...@gm...> >> To: "A mailing list for general questions and discussions." >> <jav...@li...>, har...@ho... >> Subject: Re: [jnc-users] JNC hangs >> Date: Thu, 15 Feb 2007 08:01:50 +0100 >> >> Harpal Grover wrote: >>> I downloaded the latest JNC, 1.1, and attempted to compile my java >>> app to a native app. The compilation started, but after awhile >>> stopped working and JNC just hung, with the following log output: >> >> Did you mix .java and .class source files? >> Does it work with JNC 1.0? > > Yes the files were mixed. Eclipse defaults to this :( I know. I always manually changed the setup to use src and bin folders when I created projects until just this week that I discovered that it can be made as default :-) > I am not going to > try compiling with JNC 1.0, since I do not believe it supports Java 1.5 > features Depends. Compile from the eclipse generated class files. Bytecode will not contain Java 1.5 language features any more. The only exceptions are annotations. >> A "java_parse_file, at java/jcf-parse.c:1947" error was recently fixed >> in GCJ. It might be the one you run into (unless you're compiling >> .java and .class files at the same time). > > Yes this seems to have been the issue indeed. Thanks for the tip. I > cleaned my source of any class files before I ran JNC and this time it > worked! :-) >> BTW: Adding the custom "-w" flag would suppress all Java warnings >> you're seeing. > > Thanks again for the tip. It's even better to compile from the eclipse generated bytecode if you develop with eclipse anyway. This way you also save a couple of milliseconds because GCJ doesn't have to do the bytecode compilation and you can better invest this milliseconds into something cool like... hm... lifting a finger or look at the other corner of the room ;-) > Now I have another question for everyone. Has anyone attempted to > compile a java database with JNC 1.1? No. Please also try with JNC 1.0 and compile from the bytecode to be able to compile Java 1.5 language features. I'd be interested if this stuff works with GCJ 4.2 > I have successfully compiled both > HSQLDB 1.8.7 and H2 1.0. But when my native app loads with HSQLDB, I get > this error: > > Exception in thread "main" java.lang.NoClassDefFoundError: org.hsqldb.Trace > at org.hsqldb.Trace.error(App.exe) > at gnu.java.lang.MainThread.call_main(App.exe) > at org.hsqldb.DatabaseManager.getDatabase(App.exe) > at org.hsqldb.DatabaseManager.newSession(App.exe) > at org.hsqldb.jdbc.jdbcConnection.<init>(App.exe) > at java.sql.DriverManager.getConnection(App.exe) > at com.sportscash.database.H2.DAO.createConnection(App.exe) > at foo.foo.foo.<init>(App.exe) > at App.<init>(App.exe) That's worth a GCJ bugzilla entry. But please try it with JNC 1.0 (GCJ 4.2) to know if it's a regression. > When I try with H2, I get a file locking error. I did not run into these > issues when using gcj 4.02. Which platform? Filelocking was just recently implemented in mingw (Windows). So with GCJ 4.02, I think there was no support for it. Do these two applications work on Linux? Marco |
From: Marco T. <mt...@gm...> - 2007-02-18 10:11:37
|
Lee D. Painter wrote: > I certainly didn't feel offended just a bit surprised that's all. I've > been involved with my own open source projects for the past few years > and have been in a similar position with regard to email from mailing > lists but have never come across that breed of netiquette before. Well, I suppose it really depends on the community you're in and the traffic that is generated there. I think all major and most minor lists I used so far used inline replying. So I got used to it. > I guess I would just go with the flow, but everyone is entitled to their > opinion and if that's how you want it I'm certainly not going to argue > or be offended. thanks :-) Marco |
From: Harpal G. <har...@ho...> - 2007-02-18 05:51:55
|
>From: Marco Trudel <mt...@gm...> >To: "A mailing list for general questions and discussions." ><jav...@li...>, har...@ho... >Subject: Re: [jnc-users] JNC hangs >Date: Thu, 15 Feb 2007 08:01:50 +0100 > >Harpal Grover wrote: >>I downloaded the latest JNC, 1.1, and attempted to compile my java app to >>a native app. The compilation started, but after awhile stopped working >>and JNC just hung, with the following log output: > >Did you mix .java and .class source files? >Does it work with JNC 1.0? Yes the files were mixed. Eclipse defaults to this :( I am not going to try compiling with JNC 1.0, since I do not believe it supports Java 1.5 features > >A "java_parse_file, at java/jcf-parse.c:1947" error was recently fixed in >GCJ. It might be the one you run into (unless you're compiling .java and >.class files at the same time). Yes this seems to have been the issue indeed. Thanks for the tip. I cleaned my source of any class files before I ran JNC and this time it worked! > > >BTW: Adding the custom "-w" flag would suppress all Java warnings you're >seeing. Thanks again for the tip. Now I have another question for everyone. Has anyone attempted to compile a java database with JNC 1.1? I have successfully compiled both HSQLDB 1.8.7 and H2 1.0. But when my native app loads with HSQLDB, I get this error: Exception in thread "main" java.lang.NoClassDefFoundError: org.hsqldb.Trace at org.hsqldb.Trace.error(App.exe) at gnu.java.lang.MainThread.call_main(App.exe) at org.hsqldb.DatabaseManager.getDatabase(App.exe) at org.hsqldb.DatabaseManager.newSession(App.exe) at org.hsqldb.jdbc.jdbcConnection.<init>(App.exe) at java.sql.DriverManager.getConnection(App.exe) at com.sportscash.database.H2.DAO.createConnection(App.exe) at foo.foo.foo.<init>(App.exe) at App.<init>(App.exe) When I try with H2, I get a file locking error. I did not run into these issues when using gcj 4.02. Thanks for any possible help! Harpal _________________________________________________________________ Find out the restaurants participating in Winterlicious http://local.live.com/default.aspx?v=2&cp=43.658648~-79.383962&style=r&lvl=15&tilt=-90&dir=0&alt=-1000&scene=3702663&cid=7ABE80D1746919B4!1329 >From January 26 to February 8, 2007 |
From: Lee D. P. <le...@3s...> - 2007-02-17 13:00:05
|
I certainly didn't feel offended just a bit surprised that's all. I've been involved with my own open source projects for the past few years and have been in a similar position with regard to email from mailing lists but have never come across that breed of netiquette before. I guess I would just go with the flow, but everyone is entitled to their opinion and if that's how you want it I'm certainly not going to argue or be offended. :) > -----Original Message----- > From: Marco Trudel [mailto:mt...@gm...] > Sent: 17 February 2007 11:41 > To: Lee D. Painter > Cc: A mailing list for general questions and discussions. > Subject: Re: [jnc-users] SWT compile >=20 > Lee D. Painter wrote: > >> Please do not top post... > > > > Hmmm ok as you wish. >=20 > Just in case you misunderstood that or feel offended: > This is not to terrorize you, it is just a rule for using mailinglists > because this is the only productive way of getting fast into the > picture. For instance, I get a couple of dozens mails every day. I > mostly don't know about the current discussion state. So it is a great > time-saver if I can read the lines above the question to get into the > picture again. Otherwise I had to always read the whole email what would > really suck... > So, usually, you help the people which try to help you when obeying the > general unwritten(?) rules and people will tell you if you don't. In > very worse case, your mail might just be ignored because it's > inconvenient to read. >=20 >=20 > thanks > Marco >=20 >=20 > >> Lee D. Painter wrote: > >>> Hi Marco, > >>> > >>> I read Step 1 of the manual regarding the image handlers but did not > > see > >>> the FAQ reference about this error. > >> I meant "Why do I get 'multiple definitions of ...' errors when > >> excluding the GUI or JCE?": > >> http://jnc.mtsystems.ch/frame_faq.html#multipleDefinitions > > > > Yes I understood that, I was just explaining that I did not see the FAQ > > nor the reference to the multiple definitions error until you pointed > > that out :-) > > > >>> Is it enough to remove the > >>> org.eclipse.swt.awt package from the swt.jar or is there a better > > way? > >> Yes, that would suffice. But I suggest to uncheck the checkbox in the > >> GUI when adding the jar, then only referenced classes from swt.jar > > would > >> be pulled in (thus leaving out org.eclipse.swt.awt.* and also result > > in > >> a smaller binary). > >> > > > > Ok, I had misunderstood setting. > > > >>> Perhaps you already did this for JNC? > >> Yes, check the screenshots on the homepage. They show how I compile > > JNC > >> with JNC ;-) You'll see that the checkbox for swt.jar is not checked > > and > >> thus org.eclipse.swt.awt.* won't be pulled in. > >> > >> > >> Marco > >> > >>> Regards > >>> > >>> Lee > >>> > >>> PS: Yes I'm on the list. > >>> > >>>> -----Original Message----- > >>>> From: jav...@li... > >>>> [mailto:jav...@li...] On Behalf > > Of > >>>> Marco Trudel > >>>> Sent: 17 February 2007 08:42 > >>>> To: A mailing list for general questions and discussions. > >>>> Subject: Re: [jnc-users] SWT compile > >>>> > >>>> Lee D. Painter wrote: > >>>>> Hi Marco, > >>>>> > >>>>> I had previously had problems with an AWT compile, which after > > your > >>> help > >>>>> I was able to get working. The corrupted GIF image issue however > >>> meant > >>>> I released a new version of JNC (1.1) which fixes GIFs. But it > > seems > >>> the > >>>> new GCC version has introduced new trouble with AWT/Swing. I'm on > > it. > >>>> So I still recommend to use SWT whenever possible (it will compile > >>>> flawlessly, binaries will be smaller and the UI looks better). > >>>> > >>>> > >>>>> that we cannot use the compiled .exe so we decided to add an SWT > > GUI > >>> to > >>>>> our agent, which honestly looks much better but I'm now seeing > >>> errors > >>>>> when attempting to build this. > >>>>> > >>>>> A search in our source code shows no trace of AWT or Swing, and > > the > >>>>> compile completes with the exclude GUI option. The problem lies in > >>>>> linking; here are some the errors I'm seeing. Any advice would be > >>> very > >>>>> much appreciated. > >>>>> > >>>>> I'm trying to build Windows .exe on Windows with gcc-119844-win. > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>>>> 0x20): multiple definition of > >>>>> `java::awt::AWTPermission::AWTPermission(java::lang::String*)' > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): > > first > >>>>> defined here > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>>>> 0xaa0): multiple definition of > >>>>> `java::awt::Button::Button(java::lang::String*)' > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): > > first > >>>>> defined here > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>>>> 0xc8f0): multiple definition of > >>>>> `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, > >>> int, > >>>>> double, double, int, int, java::awt::Insets*, int, int)' > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): > > first > >>>>> defined here > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ > >>>>> 0xca70): multiple definition of > >>>>> `java::awt::GridBagLayout::GridBagLayout()' > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): > > first > >>>>> defined here > >>>>> > >>>>> > > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > >>>> This is explained in the FAQ and in the manual. The problem is that > >>> SWT > >>>> uses AWT for the "org.eclipse.swt.awt" package. I assume you > > compile > >>> the > >>>> complete swt.jar into your binary. Thus you need AWT what of course > >>>> unnecessary enlarges the binary. > >>>> The solution here is to only import referenced classes from > > swt.jar. > >>>> That will omit the "org.eclipse.swt.awt" package and additionally > > have > >>>> the advantage of create a smaller binary. > >>>> But please read the manual topic "Step 1 of 4: Source" since it > > will > >>>> create new difficulties you have to consider. It's just a 10 lines > >>>> description, so you won't have to spend a lot of time reading it > > :-) > >>>> > >>>> Marco > >>>> > >>>>> Regards > >>>>> > >>>>> Lee > >>>>>> -----Original Message----- > >>>>>> From: jav...@li... > >>>>>> [mailto:jav...@li...] On > > Behalf > >>> Of > >>>>>> Marco Trudel > >>>>>> Sent: 15 February 2007 08:02 > >>>>>> To: Steven Blade; A mailing list for general questions and > >>>>> discussions. > >>>>>> Subject: Re: [jnc-users] [javaCompiler-users] compiles and > > executes > >>>>> but > >>>>>> throws java exception --help > >>>>>> > >>>>>> Please always do "reply all", else we loose the mailinglist... > >>>>>> > >>>>>> > >>>>>> Steven Blade wrote: > >>>>>>> ok sure thing but please show me where to use the static block > > of > >>>>> code > >>>>>> ok. > >>>>>> > >>>>>> Thanks for the sample. Just put that code in an own class (as the > >>>>>> attached XmlLoader.java) and add this class to the JNC > > compilation > >>>>>> source. This will ensure that the needed objects are pulled into > >>> the > >>>>>> binary. > >>>>>> You do not have to change your source. > >>>>>> > >>>>>> > >>>>>>> did it work both ways with you reading and transforming xml ? > >>>>>> Reading works, writing (transforming) fails. I'll create a > >>> bugreport > >>>>>> (it's probably a GNU classpath bug) and hope that the fix will be > >>> in > >>>>> JNC > >>>>>> 1.2. > >>>>>> > >>>>>>> one more thing does that mean i have to use gnu's jar instead of > >>>>> java's > >>>>>> ? > >>>>>> > >>>>>> No, you only have to ensure that your binary contains the xml > >>> stuff. > >>>>>> This is done with the static initializer since it references the > >>> xml > >>>>>> stuff and thus ld - the linker - will add them. > >>>>>> > >>>>>> > >>>>>> Marco > >>>>>> > >>>>>> > >>>>>>> import java.io.BufferedReader; > >>>>>>> import java.io.File; > >>>>>>> import java.io.InputStreamReader; > >>>>>>> > >>>>>>> import javax.xml.parsers.SAXParser; > >>>>>>> import javax.xml.parsers.SAXParserFactory; > >>>>>>> import javax.xml.transform.OutputKeys; > >>>>>>> import javax.xml.transform.Transformer; > >>>>>>> import javax.xml.transform.sax.SAXTransformerFactory; > >>>>>>> import javax.xml.transform.sax.TransformerHandler; > >>>>>>> import javax.xml.transform.stream.StreamResult; > >>>>>>> > >>>>>>> import org.xml.sax.Attributes; > >>>>>>> import org.xml.sax.SAXException; > >>>>>>> import org.xml.sax.helpers.AttributesImpl; > >>>>>>> import org.xml.sax.helpers.DefaultHandler; > >>>>>>> > >>>>>>> > >>>>>>> public class Foo extends DefaultHandler{ > >>>>>>> > >>>>>>> /** > >>>>>>> * @param args > >>>>>>> */ > >>>>>>> private static File file; > >>>>>>> private static String contents; > >>>>>>> private static Foo f=3Dnew Foo(); > >>>>>>> public static void main(String[] args) { > >>>>>>> // TODO Auto-generated method stub > >>>>>>> System.out.print("enter location of xml file to > > read "); > >>>>>>> BufferedReader input=3Dnew BufferedReader(new > >>>>>> InputStreamReader(System.in)); > >>>>>>> try > >>>>>>> { > >>>>>>> String sfile=3Dinput.readLine(); > >>>>>>> file=3Dnew File(sfile); > >>>>>>> readXml(); > >>>>>>> System.out.print(contents); > >>>>>>> writeXml(); > >>>>>>> }catch(Exception _){_.printStackTrace();} > >>>>>>> } > >>>>>>> private static void writeXml() > >>>>>>> { > >>>>>>> SAXTransformerFactory > > = factory=3D(SAXTransformerFactory)SAXTransformerFactory.newInstance(); > >>>>>>> try{ > >>>>>>> StreamResult stream=3Dnew StreamResult(System.out); > >>>>>>> TransformerHandler > >> handler=3Dfactory.newTransformerHandler(); > >>>>>>> Transformer trans=3Dhandler.getTransformer(); > >>>>>>> trans.setOutputProperty > > (OutputKeys.ENCODING,"ISO-8859-1"); > >>>>>>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); > >>>>>>> handler.setResult(stream); > >>>>>>> handler.startDocument(); > >>>>>>> AttributesImpl atts=3Dnew AttributesImpl(); > >>>>>>> handler.startElement("", "", "test", atts); > >>>>>>> atts.clear(); > >>>>>>> handler.startElement("", "", "foo", atts); > >>>>>>> handler.characters(new char[]{'a','b','c'}, 0, 3); > >>>>>>> handler.endElement("", "", "foo"); > >>>>>>> handler.endElement("", "", "test"); > >>>>>>> handler.endDocument(); > >>>>>>> }catch(Exception _){_.printStackTrace();} > >>>>>>> } > >>>>>>> > >>>>>>> private static void readXml() > >>>>>>> { > >>>>>>> System.out.println("reading xml..."); > >>>>>>> try{ > >>>>>>> SAXParserFactory > > factory=3DSAXParserFactory.newInstance(); // > >>>>> the > >>>>>> exception points to this line > >>>>>>> factory.setValidating(false); > >>>>>>> SAXParser parser=3Dfactory.newSAXParser(); > >>>>>>> parser.parse (file, f.new OwnHandler()); > >>>>>>> } > >>>>>>> catch(Exception _){_.printStackTrace();} > >>>>>>> } > >>>>>>> > >>>>>>> private class OwnHandler extends DefaultHandler{ > >>>>>>> > >>>>>>> public void startElement(String namespaceURI, > >>>>>>> String sName, > >>>>>>> String qName, > >>>>>>> Attributes attrs) throws > > SAXException{ > >>>>>>> contents+=3D"<"+qName+">"; > >>>>>>> } > >>>>>>> public void endElement(String uri, String localName, > > String > >>>>> qName) > >>>>>> throws SAXException{ > >>>>>>> contents+=3D"<"+qName+"/>"; > >>>>>>> } > >>>>>>> public void characters(char[] buf,int offset,int > >> length)throws > >>>>>> SAXException{ > >>>>>>> contents+=3Dnew String(buf,offset,length); > >>>>>>> } > >>>>>>> } > >>>>>>> } > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > > ------------------------------------------------------------------------ > >>>>>>> <?xml version=3D1.0 encoding=3DUTF-8?> > >>>>>>> <test> > >>>>>>> <line>testing java native compiler</line> > >>>>>>> </test> > >>>>> > > ------------------------------------------------------------------------ > >>>> - > >>>>> Take Surveys. Earn Cash. Influence the Future of IT > >>>>> Join SourceForge.net's Techsay panel and you'll get the chance to > >>> share > >>>> your > >>>>> opinions on IT & business topics through brief surveys-and earn > > cash > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE > >>> V > >>>>> _______________________________________________ > >>>>> javaCompiler-users mailing list > >>>>> jav...@li... > >>>>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > >>>>> > >>>> > > ------------------------------------------------------------------------ > >>> - > >>>> Take Surveys. Earn Cash. Influence the Future of IT > >>>> Join SourceForge.net's Techsay panel and you'll get the chance to > >>> share > >>>> your > >>>> opinions on IT & business topics through brief surveys-and earn > > cash > > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE > >>> V > >>>> _______________________________________________ > >>>> javaCompiler-users mailing list > >>>> jav...@li... > >>>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > |
From: Marco T. <mt...@gm...> - 2007-02-17 11:43:18
|
Lee D. Painter wrote: > Thanks for your help Marco it's much appreciated, and it's now linking > :) I just need to sort out the image handlers as per your docs. I add this file to the compilation: http://javacompiler.svn.sourceforge.net/viewvc/javacompiler/trunk/src/org/eclipse/swt/internal/image/ImagePullin.java?view=markup Marco > Keep up the good work. > > Lee > >> -----Original Message----- >> From: Marco Trudel [mailto:mt...@gm...] >> Sent: 17 February 2007 10:00 >> To: Lee D. Painter >> Cc: A mailing list for general questions and discussions. >> Subject: Re: [jnc-users] SWT compile >> >> Please do not top post... >> >> >> Lee D. Painter wrote: >>> Hi Marco, >>> >>> I read Step 1 of the manual regarding the image handlers but did not > see >>> the FAQ reference about this error. >> I meant "Why do I get 'multiple definitions of ...' errors when >> excluding the GUI or JCE?": >> http://jnc.mtsystems.ch/frame_faq.html#multipleDefinitions >> >> >>> Is it enough to remove the >>> org.eclipse.swt.awt package from the swt.jar or is there a better > way? >> Yes, that would suffice. But I suggest to uncheck the checkbox in the >> GUI when adding the jar, then only referenced classes from swt.jar > would >> be pulled in (thus leaving out org.eclipse.swt.awt.* and also result > in >> a smaller binary). >> >> >>> Perhaps you already did this for JNC? >> Yes, check the screenshots on the homepage. They show how I compile > JNC >> with JNC ;-) You'll see that the checkbox for swt.jar is not checked > and >> thus org.eclipse.swt.awt.* won't be pulled in. >> >> >> Marco >> >>> Regards >>> >>> Lee >>> >>> PS: Yes I'm on the list. >>> >>>> -----Original Message----- >>>> From: jav...@li... >>>> [mailto:jav...@li...] On Behalf > Of >>>> Marco Trudel >>>> Sent: 17 February 2007 08:42 >>>> To: A mailing list for general questions and discussions. >>>> Subject: Re: [jnc-users] SWT compile >>>> >>>> Lee D. Painter wrote: >>>>> Hi Marco, >>>>> >>>>> I had previously had problems with an AWT compile, which after > your >>> help >>>>> I was able to get working. The corrupted GIF image issue however >>> meant >>>> I released a new version of JNC (1.1) which fixes GIFs. But it > seems >>> the >>>> new GCC version has introduced new trouble with AWT/Swing. I'm on > it. >>>> So I still recommend to use SWT whenever possible (it will compile >>>> flawlessly, binaries will be smaller and the UI looks better). >>>> >>>> >>>>> that we cannot use the compiled .exe so we decided to add an SWT > GUI >>> to >>>>> our agent, which honestly looks much better but I'm now seeing >>> errors >>>>> when attempting to build this. >>>>> >>>>> A search in our source code shows no trace of AWT or Swing, and > the >>>>> compile completes with the exclude GUI option. The problem lies in >>>>> linking; here are some the errors I'm seeing. Any advice would be >>> very >>>>> much appreciated. >>>>> >>>>> I'm trying to build Windows .exe on Windows with gcc-119844-win. >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0x20): multiple definition of >>>>> `java::awt::AWTPermission::AWTPermission(java::lang::String*)' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0xaa0): multiple definition of >>>>> `java::awt::Button::Button(java::lang::String*)' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0xc8f0): multiple definition of >>>>> `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, >>> int, >>>>> double, double, int, int, java::awt::Insets*, int, int)' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0xca70): multiple definition of >>>>> `java::awt::GridBagLayout::GridBagLayout()' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>> This is explained in the FAQ and in the manual. The problem is that >>> SWT >>>> uses AWT for the "org.eclipse.swt.awt" package. I assume you > compile >>> the >>>> complete swt.jar into your binary. Thus you need AWT what of course >>>> unnecessary enlarges the binary. >>>> The solution here is to only import referenced classes from > swt.jar. >>>> That will omit the "org.eclipse.swt.awt" package and additionally > have >>>> the advantage of create a smaller binary. >>>> But please read the manual topic "Step 1 of 4: Source" since it > will >>>> create new difficulties you have to consider. It's just a 10 lines >>>> description, so you won't have to spend a lot of time reading it > :-) >>>> >>>> Marco >>>> >>>>> Regards >>>>> >>>>> Lee >>>>>> -----Original Message----- >>>>>> From: jav...@li... >>>>>> [mailto:jav...@li...] On > Behalf >>> Of >>>>>> Marco Trudel >>>>>> Sent: 15 February 2007 08:02 >>>>>> To: Steven Blade; A mailing list for general questions and >>>>> discussions. >>>>>> Subject: Re: [jnc-users] [javaCompiler-users] compiles and > executes >>>>> but >>>>>> throws java exception --help >>>>>> >>>>>> Please always do "reply all", else we loose the mailinglist... >>>>>> >>>>>> >>>>>> Steven Blade wrote: >>>>>>> ok sure thing but please show me where to use the static block > of >>>>> code >>>>>> ok. >>>>>> >>>>>> Thanks for the sample. Just put that code in an own class (as the >>>>>> attached XmlLoader.java) and add this class to the JNC > compilation >>>>>> source. This will ensure that the needed objects are pulled into >>> the >>>>>> binary. >>>>>> You do not have to change your source. >>>>>> >>>>>> >>>>>>> did it work both ways with you reading and transforming xml ? >>>>>> Reading works, writing (transforming) fails. I'll create a >>> bugreport >>>>>> (it's probably a GNU classpath bug) and hope that the fix will be >>> in >>>>> JNC >>>>>> 1.2. >>>>>> >>>>>>> one more thing does that mean i have to use gnu's jar instead of >>>>> java's >>>>>> ? >>>>>> >>>>>> No, you only have to ensure that your binary contains the xml >>> stuff. >>>>>> This is done with the static initializer since it references the >>> xml >>>>>> stuff and thus ld - the linker - will add them. >>>>>> >>>>>> >>>>>> Marco >>>>>> >>>>>> >>>>>>> import java.io.BufferedReader; >>>>>>> import java.io.File; >>>>>>> import java.io.InputStreamReader; >>>>>>> >>>>>>> import javax.xml.parsers.SAXParser; >>>>>>> import javax.xml.parsers.SAXParserFactory; >>>>>>> import javax.xml.transform.OutputKeys; >>>>>>> import javax.xml.transform.Transformer; >>>>>>> import javax.xml.transform.sax.SAXTransformerFactory; >>>>>>> import javax.xml.transform.sax.TransformerHandler; >>>>>>> import javax.xml.transform.stream.StreamResult; >>>>>>> >>>>>>> import org.xml.sax.Attributes; >>>>>>> import org.xml.sax.SAXException; >>>>>>> import org.xml.sax.helpers.AttributesImpl; >>>>>>> import org.xml.sax.helpers.DefaultHandler; >>>>>>> >>>>>>> >>>>>>> public class Foo extends DefaultHandler{ >>>>>>> >>>>>>> /** >>>>>>> * @param args >>>>>>> */ >>>>>>> private static File file; >>>>>>> private static String contents; >>>>>>> private static Foo f=new Foo(); >>>>>>> public static void main(String[] args) { >>>>>>> // TODO Auto-generated method stub >>>>>>> System.out.print("enter location of xml file to > read "); >>>>>>> BufferedReader input=new BufferedReader(new >>>>>> InputStreamReader(System.in)); >>>>>>> try >>>>>>> { >>>>>>> String sfile=input.readLine(); >>>>>>> file=new File(sfile); >>>>>>> readXml(); >>>>>>> System.out.print(contents); >>>>>>> writeXml(); >>>>>>> }catch(Exception _){_.printStackTrace();} >>>>>>> } >>>>>>> private static void writeXml() >>>>>>> { >>>>>>> SAXTransformerFactory > factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); >>>>>>> try{ >>>>>>> StreamResult stream=new StreamResult(System.out); >>>>>>> TransformerHandler >> handler=factory.newTransformerHandler(); >>>>>>> Transformer trans=handler.getTransformer(); >>>>>>> trans.setOutputProperty > (OutputKeys.ENCODING,"ISO-8859-1"); >>>>>>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); >>>>>>> handler.setResult(stream); >>>>>>> handler.startDocument(); >>>>>>> AttributesImpl atts=new AttributesImpl(); >>>>>>> handler.startElement("", "", "test", atts); >>>>>>> atts.clear(); >>>>>>> handler.startElement("", "", "foo", atts); >>>>>>> handler.characters(new char[]{'a','b','c'}, 0, 3); >>>>>>> handler.endElement("", "", "foo"); >>>>>>> handler.endElement("", "", "test"); >>>>>>> handler.endDocument(); >>>>>>> }catch(Exception _){_.printStackTrace();} >>>>>>> } >>>>>>> >>>>>>> private static void readXml() >>>>>>> { >>>>>>> System.out.println("reading xml..."); >>>>>>> try{ >>>>>>> SAXParserFactory > factory=SAXParserFactory.newInstance(); // >>>>> the >>>>>> exception points to this line >>>>>>> factory.setValidating(false); >>>>>>> SAXParser parser=factory.newSAXParser(); >>>>>>> parser.parse (file, f.new OwnHandler()); >>>>>>> } >>>>>>> catch(Exception _){_.printStackTrace();} >>>>>>> } >>>>>>> >>>>>>> private class OwnHandler extends DefaultHandler{ >>>>>>> >>>>>>> public void startElement(String namespaceURI, >>>>>>> String sName, >>>>>>> String qName, >>>>>>> Attributes attrs) throws > SAXException{ >>>>>>> contents+="<"+qName+">"; >>>>>>> } >>>>>>> public void endElement(String uri, String localName, > String >>>>> qName) >>>>>> throws SAXException{ >>>>>>> contents+="<"+qName+"/>"; >>>>>>> } >>>>>>> public void characters(char[] buf,int offset,int >> length)throws >>>>>> SAXException{ >>>>>>> contents+=new String(buf,offset,length); >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> > ------------------------------------------------------------------------ >>>>>>> <?xml version=1.0 encoding=UTF-8?> >>>>>>> <test> >>>>>>> <line>testing java native compiler</line> >>>>>>> </test> >>>>> > ------------------------------------------------------------------------ >>>> - >>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share >>>> your >>>>> opinions on IT & business topics through brief surveys-and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE >>> V >>>>> _______________________________________________ >>>>> javaCompiler-users mailing list >>>>> jav...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users >>>>> >>>> > ------------------------------------------------------------------------ >>> - >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share >>>> your >>>> opinions on IT & business topics through brief surveys-and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE >>> V >>>> _______________________________________________ >>>> javaCompiler-users mailing list >>>> jav...@li... >>>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |
From: Marco T. <mt...@gm...> - 2007-02-17 11:40:50
|
Lee D. Painter wrote: >> Please do not top post... > > Hmmm ok as you wish. Just in case you misunderstood that or feel offended: This is not to terrorize you, it is just a rule for using mailinglists because this is the only productive way of getting fast into the picture. For instance, I get a couple of dozens mails every day. I mostly don't know about the current discussion state. So it is a great time-saver if I can read the lines above the question to get into the picture again. Otherwise I had to always read the whole email what would really suck... So, usually, you help the people which try to help you when obeying the general unwritten(?) rules and people will tell you if you don't. In very worse case, your mail might just be ignored because it's inconvenient to read. thanks Marco >> Lee D. Painter wrote: >>> Hi Marco, >>> >>> I read Step 1 of the manual regarding the image handlers but did not > see >>> the FAQ reference about this error. >> I meant "Why do I get 'multiple definitions of ...' errors when >> excluding the GUI or JCE?": >> http://jnc.mtsystems.ch/frame_faq.html#multipleDefinitions > > Yes I understood that, I was just explaining that I did not see the FAQ > nor the reference to the multiple definitions error until you pointed > that out :-) > >>> Is it enough to remove the >>> org.eclipse.swt.awt package from the swt.jar or is there a better > way? >> Yes, that would suffice. But I suggest to uncheck the checkbox in the >> GUI when adding the jar, then only referenced classes from swt.jar > would >> be pulled in (thus leaving out org.eclipse.swt.awt.* and also result > in >> a smaller binary). >> > > Ok, I had misunderstood setting. > >>> Perhaps you already did this for JNC? >> Yes, check the screenshots on the homepage. They show how I compile > JNC >> with JNC ;-) You'll see that the checkbox for swt.jar is not checked > and >> thus org.eclipse.swt.awt.* won't be pulled in. >> >> >> Marco >> >>> Regards >>> >>> Lee >>> >>> PS: Yes I'm on the list. >>> >>>> -----Original Message----- >>>> From: jav...@li... >>>> [mailto:jav...@li...] On Behalf > Of >>>> Marco Trudel >>>> Sent: 17 February 2007 08:42 >>>> To: A mailing list for general questions and discussions. >>>> Subject: Re: [jnc-users] SWT compile >>>> >>>> Lee D. Painter wrote: >>>>> Hi Marco, >>>>> >>>>> I had previously had problems with an AWT compile, which after > your >>> help >>>>> I was able to get working. The corrupted GIF image issue however >>> meant >>>> I released a new version of JNC (1.1) which fixes GIFs. But it > seems >>> the >>>> new GCC version has introduced new trouble with AWT/Swing. I'm on > it. >>>> So I still recommend to use SWT whenever possible (it will compile >>>> flawlessly, binaries will be smaller and the UI looks better). >>>> >>>> >>>>> that we cannot use the compiled .exe so we decided to add an SWT > GUI >>> to >>>>> our agent, which honestly looks much better but I'm now seeing >>> errors >>>>> when attempting to build this. >>>>> >>>>> A search in our source code shows no trace of AWT or Swing, and > the >>>>> compile completes with the exclude GUI option. The problem lies in >>>>> linking; here are some the errors I'm seeing. Any advice would be >>> very >>>>> much appreciated. >>>>> >>>>> I'm trying to build Windows .exe on Windows with gcc-119844-win. >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0x20): multiple definition of >>>>> `java::awt::AWTPermission::AWTPermission(java::lang::String*)' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x290): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0xaa0): multiple definition of >>>>> `java::awt::Button::Button(java::lang::String*)' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x2d0): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0xc8f0): multiple definition of >>>>> `java::awt::GridBagConstraints::GridBagConstraints(int, int, int, >>> int, >>>>> double, double, int, int, java::awt::Insets*, int, int)' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x150): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- > mingw32/4.2.0/../../../libgcj.a(gui_java_awt.o):gui_java_awt.zip:(.text+ >>>>> 0xca70): multiple definition of >>>>> `java::awt::GridBagLayout::GridBagLayout()' >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>>> mingw32/4.2.0/../../../libjncNoGui.a:noGui.jar:(.text+0x130): > first >>>>> defined here >>>>> >>>>> > c:/tools/javanativecompiler-1.0.1/gcc-119844-win/bin/../lib/gcc/i686-pc- >>>> This is explained in the FAQ and in the manual. The problem is that >>> SWT >>>> uses AWT for the "org.eclipse.swt.awt" package. I assume you > compile >>> the >>>> complete swt.jar into your binary. Thus you need AWT what of course >>>> unnecessary enlarges the binary. >>>> The solution here is to only import referenced classes from > swt.jar. >>>> That will omit the "org.eclipse.swt.awt" package and additionally > have >>>> the advantage of create a smaller binary. >>>> But please read the manual topic "Step 1 of 4: Source" since it > will >>>> create new difficulties you have to consider. It's just a 10 lines >>>> description, so you won't have to spend a lot of time reading it > :-) >>>> >>>> Marco >>>> >>>>> Regards >>>>> >>>>> Lee >>>>>> -----Original Message----- >>>>>> From: jav...@li... >>>>>> [mailto:jav...@li...] On > Behalf >>> Of >>>>>> Marco Trudel >>>>>> Sent: 15 February 2007 08:02 >>>>>> To: Steven Blade; A mailing list for general questions and >>>>> discussions. >>>>>> Subject: Re: [jnc-users] [javaCompiler-users] compiles and > executes >>>>> but >>>>>> throws java exception --help >>>>>> >>>>>> Please always do "reply all", else we loose the mailinglist... >>>>>> >>>>>> >>>>>> Steven Blade wrote: >>>>>>> ok sure thing but please show me where to use the static block > of >>>>> code >>>>>> ok. >>>>>> >>>>>> Thanks for the sample. Just put that code in an own class (as the >>>>>> attached XmlLoader.java) and add this class to the JNC > compilation >>>>>> source. This will ensure that the needed objects are pulled into >>> the >>>>>> binary. >>>>>> You do not have to change your source. >>>>>> >>>>>> >>>>>>> did it work both ways with you reading and transforming xml ? >>>>>> Reading works, writing (transforming) fails. I'll create a >>> bugreport >>>>>> (it's probably a GNU classpath bug) and hope that the fix will be >>> in >>>>> JNC >>>>>> 1.2. >>>>>> >>>>>>> one more thing does that mean i have to use gnu's jar instead of >>>>> java's >>>>>> ? >>>>>> >>>>>> No, you only have to ensure that your binary contains the xml >>> stuff. >>>>>> This is done with the static initializer since it references the >>> xml >>>>>> stuff and thus ld - the linker - will add them. >>>>>> >>>>>> >>>>>> Marco >>>>>> >>>>>> >>>>>>> import java.io.BufferedReader; >>>>>>> import java.io.File; >>>>>>> import java.io.InputStreamReader; >>>>>>> >>>>>>> import javax.xml.parsers.SAXParser; >>>>>>> import javax.xml.parsers.SAXParserFactory; >>>>>>> import javax.xml.transform.OutputKeys; >>>>>>> import javax.xml.transform.Transformer; >>>>>>> import javax.xml.transform.sax.SAXTransformerFactory; >>>>>>> import javax.xml.transform.sax.TransformerHandler; >>>>>>> import javax.xml.transform.stream.StreamResult; >>>>>>> >>>>>>> import org.xml.sax.Attributes; >>>>>>> import org.xml.sax.SAXException; >>>>>>> import org.xml.sax.helpers.AttributesImpl; >>>>>>> import org.xml.sax.helpers.DefaultHandler; >>>>>>> >>>>>>> >>>>>>> public class Foo extends DefaultHandler{ >>>>>>> >>>>>>> /** >>>>>>> * @param args >>>>>>> */ >>>>>>> private static File file; >>>>>>> private static String contents; >>>>>>> private static Foo f=new Foo(); >>>>>>> public static void main(String[] args) { >>>>>>> // TODO Auto-generated method stub >>>>>>> System.out.print("enter location of xml file to > read "); >>>>>>> BufferedReader input=new BufferedReader(new >>>>>> InputStreamReader(System.in)); >>>>>>> try >>>>>>> { >>>>>>> String sfile=input.readLine(); >>>>>>> file=new File(sfile); >>>>>>> readXml(); >>>>>>> System.out.print(contents); >>>>>>> writeXml(); >>>>>>> }catch(Exception _){_.printStackTrace();} >>>>>>> } >>>>>>> private static void writeXml() >>>>>>> { >>>>>>> SAXTransformerFactory > factory=(SAXTransformerFactory)SAXTransformerFactory.newInstance(); >>>>>>> try{ >>>>>>> StreamResult stream=new StreamResult(System.out); >>>>>>> TransformerHandler >> handler=factory.newTransformerHandler(); >>>>>>> Transformer trans=handler.getTransformer(); >>>>>>> trans.setOutputProperty > (OutputKeys.ENCODING,"ISO-8859-1"); >>>>>>> trans.setOutputProperty(OutputKeys.INDENT,"yes"); >>>>>>> handler.setResult(stream); >>>>>>> handler.startDocument(); >>>>>>> AttributesImpl atts=new AttributesImpl(); >>>>>>> handler.startElement("", "", "test", atts); >>>>>>> atts.clear(); >>>>>>> handler.startElement("", "", "foo", atts); >>>>>>> handler.characters(new char[]{'a','b','c'}, 0, 3); >>>>>>> handler.endElement("", "", "foo"); >>>>>>> handler.endElement("", "", "test"); >>>>>>> handler.endDocument(); >>>>>>> }catch(Exception _){_.printStackTrace();} >>>>>>> } >>>>>>> >>>>>>> private static void readXml() >>>>>>> { >>>>>>> System.out.println("reading xml..."); >>>>>>> try{ >>>>>>> SAXParserFactory > factory=SAXParserFactory.newInstance(); // >>>>> the >>>>>> exception points to this line >>>>>>> factory.setValidating(false); >>>>>>> SAXParser parser=factory.newSAXParser(); >>>>>>> parser.parse (file, f.new OwnHandler()); >>>>>>> } >>>>>>> catch(Exception _){_.printStackTrace();} >>>>>>> } >>>>>>> >>>>>>> private class OwnHandler extends DefaultHandler{ >>>>>>> >>>>>>> public void startElement(String namespaceURI, >>>>>>> String sName, >>>>>>> String qName, >>>>>>> Attributes attrs) throws > SAXException{ >>>>>>> contents+="<"+qName+">"; >>>>>>> } >>>>>>> public void endElement(String uri, String localName, > String >>>>> qName) >>>>>> throws SAXException{ >>>>>>> contents+="<"+qName+"/>"; >>>>>>> } >>>>>>> public void characters(char[] buf,int offset,int >> length)throws >>>>>> SAXException{ >>>>>>> contents+=new String(buf,offset,length); >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> > ------------------------------------------------------------------------ >>>>>>> <?xml version=1.0 encoding=UTF-8?> >>>>>>> <test> >>>>>>> <line>testing java native compiler</line> >>>>>>> </test> >>>>> > ------------------------------------------------------------------------ >>>> - >>>>> Take Surveys. Earn Cash. Influence the Future of IT >>>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share >>>> your >>>>> opinions on IT & business topics through brief surveys-and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE >>> V >>>>> _______________________________________________ >>>>> javaCompiler-users mailing list >>>>> jav...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users >>>>> >>>> > ------------------------------------------------------------------------ >>> - >>>> Take Surveys. Earn Cash. Influence the Future of IT >>>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share >>>> your >>>> opinions on IT & business topics through brief surveys-and earn > cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE >>> V >>>> _______________________________________________ >>>> javaCompiler-users mailing list >>>> jav...@li... >>>> https://lists.sourceforge.net/lists/listinfo/javacompiler-users > |