0 Replies Latest reply: Jan 21, 2008 2:35 AM by 843851 RSS

    Starting EmbeddedJava with AWT support!

    843851
      Hello,

      I've downloaded EmbeddedJava for Linux x86 (jre-1_5_0_10-eval-b02-min-linux-i586.tar.gz) and tried to start an AWT application inside it, but if failed to start due to:
      java.awt.HeadlessException
      at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
      at java.awt.Window.<init>(Window.java:317)
      at java.awt.Frame.<init>(Frame.java:419)
      at java.awt.Frame.<init>(Frame.java:384)
      at hmimgr.gui.GUI.<init>(GUI.java:84)
      at hmimgr.ViewBuilderImpl.<init>(ViewBuilderImpl.java:34)
      at hmimgr.HmiMgrView.<init>(HmiMgrView.java:62)

      I added in the start script the option java.awt.headless=false, but then I received another exception, which I do not know how to pass over:

      java.lang.UnsatisfiedLinkError: Can't load library: /jvm/jre1.5.0_10/lib/i386/xawt/libmawt.so
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)
      at java.lang.Runtime.load0(Runtime.java:769)
      at java.lang.System.load(System.java:968)
      at java.lang.ClassLoader$NativeLibrary.load(Native Method)
      at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
      at java.lang.Runtime.loadLibrary0(Runtime.java:822)
      at java.lang.System.loadLibrary(System.java:993)
      at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
      at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
      at java.awt.Component.<clinit>(Component.java:545)
      at hmimgr.HmiMgrView.<init>(HmiMgrView.java:62)

      I looked at my jvm installation folder and I found that libmawt.so is available under /jvm/jre1.5.0_10/lib/i386/headless folder, not under /jvm/jre1.5.0_10/lib/i386/awt as the jvm expects it!!!

      Any suggestions are appreciated!

      PS: I get the same problem with the older Java SE Embedded installation for Linux x86 - jre-1_5_0_06-eval-b01-min-linux-i586.