Thread: [Jamvm-general] Unable to run GUI application using cross-compiled jamvm for arm
Brought to you by:
rlougher
From: Adityadham <adi...@gm...> - 2013-03-22 14:37:49
|
Hello everyone, We have cross-compiled the gnu classpath 0.98 and jamvm 1.5_4 for our arm xscale device. When we run helloworld program, it works perfectly fine. But when we run gui applications, there is no response. Below are our commands which we gave for cross-compiling: 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 --enable-local-sockets --enable-collections --enable-xmlj --enable-default-toolkit=gnu.java.awt.peer.gtk.XToolkit make make install JAMVM: ./configure --host arm-xscale-linux-gnueabi --prefix=/usr/local --with-classpath-install-dir=/usr/local –enable-ffi make make install We then transfer the required files to our device. we run our programs as jamvm helloworld jamvm -verbose Button helloworld runs perfectly fine and gives the desired output in proper time. But when we run any gui sample and give verbose option it shows that it is loading and linking a lot of classes which are all present and finally it stops after displaying the following statements: [Loaded gnu/java/awt/BitMaskExtent from /usr/local/share/classpath/glibj.zip] [Linking class gnu/java/awt/BitMaskExtent] Can someone please guide us on this. This is becoming very critical. It will be a great help if someone can direct us towards fixing this to see what we are missing to get the gui applications running with jamvm. We have made a small sample using java swing which creates a frame and 2 buttons over it. Thanks in advance. -- View this message in context: http://old.nabble.com/Unable-to-run-GUI-application-using-cross-compiled-jamvm-for-arm-tp35205711p35205711.html Sent from the JamVM mailing list archive at Nabble.com. |
From: Xerxes R. <xe...@za...> - 2013-03-23 11:27:13
|
Adityadham wrote: > > Hello everyone, > > We have cross-compiled the gnu classpath 0.98 and jamvm 1.5_4 for our arm > xscale device. When we run helloworld program, it works perfectly fine. > But when we run gui applications, there is no response. Below are our > commands which we gave for cross-compiling: > .. > 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 > --enable-local-sockets --enable-collections --enable-xmlj > --enable-default-toolkit=gnu.java.awt.peer.gtk.XToolkit > ... > [Loaded gnu/java/awt/BitMaskExtent from > /usr/local/share/classpath/glibj.zip] > [Linking class gnu/java/awt/BitMaskExtent] > > Can someone please guide us on this. This is becoming very critical. > > > It will be a great help if someone can direct us towards fixing this to > see what we are missing to get the gui applications running with jamvm. We > have made a small sample using java swing which creates a frame and 2 > buttons over it. > > Thanks in advance. > I believe you have cross-compiled gnu-classpath with an incompatible set of options. If you want to use the gtk-peer to implement awt and swing then remove the –disable-gtk-peer option to GNU Classpath configure. Cheers Xerxes -- View this message in context: http://old.nabble.com/Unable-to-run-GUI-application-using-cross-compiled-jamvm-for-arm-tp35205711p35209661.html Sent from the JamVM mailing list archive at Nabble.com. |
From: Adityadham <adi...@gm...> - 2013-03-23 16:36:08
|
Thanks for your reply Xerxes. I made 2 different changes while compiling GNU Classpath. Both compiled successfully. 1. ./configure --host=arm-xscale-linux-gnueabi --prefix=/usr/local --disable-examples --with-x --disable-qt-peer --enable-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.gtk.GtkToolkit After transferring the above compiled gnu classpath and jamvm to the device, when I run a sample swing application, it shows nothing. When I did verbose it loads and links so many classes and finally stops with following two lines [Loaded gnu/java/awt/BitMaskExtent from /usr/local/share/classpath/glibj.zip] [Linking class gnu/java/awt/BitMaskExtent] 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) at java.awt.Font.<init>(Font.java:381) at javax.swing.plaf.FontUIResource.<init>(FontUIResource.java:79) at javax.swing.plaf.metal.DefaultMetalTheme.<clinit>(DefaultMetalTheme.java:69) at javax.swing.plaf.metal.MetalLookAndFeel.getCurrentTheme(MetalLookAndFeel.java:1356) at javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(MetalLookAndFeel.java:91) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:150) at javax.swing.UIManager.setLookAndFeel(UIManager.java:913) at javax.swing.UIManager.<clinit>(UIManager.java:245) at javax.swing.JFrame.frameInit(JFrame.java:167) at javax.swing.JFrame.<init>(JFrame.java:126) at Main1.main(Main1.java:23) 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 Adityadham wrote: > > Hello everyone, > > We have cross-compiled the gnu classpath 0.98 and jamvm 1.5_4 for our arm > xscale device. When we run helloworld program, it works perfectly fine. > But when we run gui applications, there is no response. Below are our > commands which we gave for cross-compiling: > > 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 > --enable-local-sockets --enable-collections --enable-xmlj > --enable-default-toolkit=gnu.java.awt.peer.gtk.XToolkit > > make > > make install > > JAMVM: > > ./configure --host arm-xscale-linux-gnueabi --prefix=/usr/local > --with-classpath-install-dir=/usr/local –enable-ffi > > make > > make install > > We then transfer the required files to our device. > > > we run our programs as > > jamvm helloworld > > jamvm -verbose Button > > helloworld runs perfectly fine and gives the desired output in proper > time. But when we run any gui sample and give verbose option it shows that > it is loading and linking a lot of classes which are all present and > finally it stops after displaying the following statements: > [Loaded gnu/java/awt/BitMaskExtent from > /usr/local/share/classpath/glibj.zip] > [Linking class gnu/java/awt/BitMaskExtent] > > Can someone please guide us on this. This is becoming very critical. > > > It will be a great help if someone can direct us towards fixing this to > see what we are missing to get the gui applications running with jamvm. We > have made a small sample using java swing which creates a frame and 2 > buttons over it. > > Thanks in advance. > -- View this message in context: http://old.nabble.com/Unable-to-run-GUI-application-using-cross-compiled-jamvm-for-arm-tp35205711p35210263.html Sent from the JamVM mailing list archive at Nabble.com. |
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. |
From: Andrew H. <gnu...@re...> - 2013-03-27 20:48:49
|
----- Original Message ----- > > > 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. > $ jar tf /home/andrew/build/classpath/share/classpath/glibj.zip |grep fonts\.properties gnu/java/awt/font/fonts.properties gnu/java/awt/peer/x/xfonts.properties gnu/java/awt/peer/x/fonts.properties > 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 > http://developer.classpath.org/mailman/listinfo/classpath actually. > 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. > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Jamvm-general mailing list > Jam...@li... > https://lists.sourceforge.net/lists/listinfo/jamvm-general > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 |
From: Adityadham <adi...@gm...> - 2013-03-25 13:43:54
|
Hello Xerxes, Thanks a lot for your inputs. I have posted my query on gnu classpath forums. Meanwhile can you please direct me towards a place from where I can find openjdk classes source code which I can cross-compile for my arm xscale machine. Thanks, Aditya -- View this message in context: http://old.nabble.com/Unable-to-run-GUI-application-using-cross-compiled-jamvm-for-arm-tp35205711p35215046.html Sent from the JamVM mailing list archive at Nabble.com. |
From: Xerxes R. <xe...@za...> - 2013-03-25 14:15:04
|
2013-03-25 14:43, Adityadham skrev: > > Hello Xerxes, > > Thanks a lot for your inputs. I have posted my query on gnu classpath forums. Meanwhile can you please direct me towards a place from where I can find openjdk classes source code which I can cross-compile for my arm xscale machine. > > Thanks, Aditya > You can cross-compile OpenJDK 6 + jamvm and OpenJDK 7 + jamvm by using OpenEmbedded oe-core+meta-java Woglinde is the active maintainer of the meta-java cross compile scripts. Build instructions: https://github.com/woglinde/meta-java/wiki To find out more about the OpenEmbedded cross compile infrastructure read: http://www.openembedded.org/wiki/Main_Page Cheers Xerxes |
From: Adityadham <adi...@gm...> - 2013-03-29 11:05:30
|
Dear Andrews, Thanks for your reply. I searched for the files which you asked in your reply. All those files are present in our port on the device. Still no luck :,( -- View this message in context: http://old.nabble.com/Unable-to-run-GUI-application-using-cross-compiled-jamvm-for-arm-tp35205711p35232162.html Sent from the JamVM mailing list archive at Nabble.com. |