Re: [Jamvm-general] Unable to run GUI application using cross-compiled jamvm for arm
Brought to you by:
rlougher
From: Xerxes R. <xe...@za...> - 2013-03-24 19:53:27
|
Adityadham wrote: > > Thanks for your reply Xerxes. I made 2 different changes while compiling > GNU Classpath. Both compiled successfully. > ... > 2. This was another variation which I tried in which I disabled gtk and > default toolkil I gave of X. > GNU Classpath > ./configure --host=arm-xscale-linux-gnueabi --prefix=/usr/local > --disable-examples --with-x --disable-qt-peer --disable-gtk-peer > --disable-gconf-peer --disable-plugin --enable-alsa --disable-dssi > --with-escher=/home/warrior/java-project/escher-0.3/src > --enable-local-sockets --enable-collections --enable-xmlj --disable-Werror > --enable-tools --enable-default-toolkit=gnu.java.awt.peer.x.XToolkit > > After transferring the above compiled gnu classpath and jamvm to the > device, when I run a sample swing application, it gives me following > error: > > Exception in thread "main" java.lang.ExceptionInInitializerError > at gnu.java.awt.peer.x.XToolkit.getClasspathFontPeer(XToolkit.java:208) > at java.awt.Font.getPeerFromToolkit(Font.java:329) > ... > Caused by: java.lang.NullPointerException > at java.io.InputStreamReader.<init>(InputStreamReader.java:208) > at java.util.Properties.load(Properties.java:380) > at > gnu.java.awt.font.OpenTypeFontPeer.<clinit>(OpenTypeFontPeer.java:93) > at gnu.java.awt.peer.x.XToolkit.getClasspathFontPeer(XToolkit.java:208) > > > I am still not able to figure out what I am missing. Can you please give > me further pointers to that I can move in correct direction. > > Thanks > The error above at gnu.java.awt.font.OpenTypeFontPeer.<clinit>(OpenTypeFontPeer.java:93) if you look at the source code for gnu classpath you can see that the null pointer is caused by some issue for gnu classpath to locate the font.properties resource file, that contains a list of system fonts to use for awt and swing. Most likely you have missed to copy some required file to your arm board or the classpath do not contain the jar containing the resource/gnu/java/awt/font/fonts.properties . Remember that custom gnu classpath configure setups with lots of --enable and --disable options are naturally much less tested by other gnu classpath developers compared to using the default settings without any extra --enable or --disable options. None of these errors looks to be JamVM related therefore I recommend you to ask classpath swing setup and configure questions on the GNU Classpath mailinglist: http://savannah.gnu.org/mail/?group=classpath You may want to try run JamVM in combination with the OpenJDK classes that also provide AWT and Swing support. Cheers Xerxes -- View this message in context: http://old.nabble.com/Unable-to-run-GUI-application-using-cross-compiled-jamvm-for-arm-tp35205711p35212571.html Sent from the JamVM mailing list archive at Nabble.com. |