Java exception when launching Sonic Management Console using Cygwin

  • 7007566
  • 13-Jan-2011
  • 26-Apr-2012

Environment

Novell Sentinel 6.1

Situation

Java exception - java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0 while executing startmc.sh on Windows using Cygwin X server:

Exception in thread "main" java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1031)
at sun.awt.X11.XFramePeer.setIconImage(XFramePeer.java:245)
at sun.awt.X11.XFramePeer.postInit(XFramePeer.java:103)
at sun.awt.X11.XBaseWindow.init(XBaseWindow.java:146)
at sun.awt.X11.XBaseWindow.<init>(XBaseWindow.java:179)
at sun.awt.X11.XWindow.<init>(XWindow.java:112)

Resolution

Set the following variable before you run the Sonic Management Console (startmc.sh):

export AWT_TOOLKIT=MToolkit

After setting the environment variable you will be able to start the Sonic Management Console, and the java exception will no longer appear.

Additional Information

AWT has been re-designed on the Solaris and Linux platforms as listed in the following announcement:

XToolkit on Solaris/Linux
http://download.oracle.com/javase/6/docs/technotes/guides/awt/1.5/xawt.html