Java AWT

I am having trouble using AWT on a PC running Neutrino with Momentics (PE) installed.

With Momentics installed it is possible to use basic Java text io functionality but not AWT.

Having found no clear instructions on getting AWT to work in this environment I have done the following:

(a) Downloaded WSDD 5.5
(b) Copied libswt-photon-2130.so into usr/qde/eclipse/jre/bin/libswt-photon-2130.so
(c) Unpacked ppro-ui-qnx.zip and jclMax/classes.zip into a single directory structure.

I can now use j9c and j9 (but not eclipse) to build and run java that uses simple awt components (buttons), if I specify this unpacked directory structure as the classpath. (I couldn’t get it to work referencing the multiple zip files and I couldn’t get eclipse to use the JRE and the external ppro-ui-qnx.zip together).

However I get exceptions when I try to use java.awt.FontMetrics; java.awt.Graphics2D; and java.awt.geom.* classes to build my own button from a java.awt.Component.

I get the feeling that I am going about this all wrong - its got to be easier to get AWT running than this…

Please can anybody help

Not sure about your CLASSPATH problems, but AWT under QNX is limited, I think it’s at PersonalJava level if my memory serves. That rules out a lot of the fancy AWT stuff.

Thanks for the help.

I checked out the J2ME Personal Profile spec (JSR-62) and cut out anything not supported. This only left the FontMetrics problem which I found was caused by supplying a null name to the Font class constructor. This is supposed to cause the Default font to be used but it looks like null gets passed through to an underlying class which throws an exception. Needless to say this was fixed by supplying a font name!