Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    [SOLVED] Error running swing on Xfree86

    Hi all
    I tried to run a simple Swing application on a single board computer running Linux and i've installed xfree86. the x-server runs with no errors. but when i run the swing application, it throws error as below...

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 386
    at java.awt.image.IndexColorModel.setRGBs(Unknown Source)
    at java.awt.image.IndexColorModel.<init>(Unknown Source)
    at sun.awt.X11GraphicsConfig.makeColorModel(Native Method)
    at sun.awt.X11GraphicsConfig.getColorModel(Unknown Source)
    at sun.awt.X11.XWindow.getColorModel(Unknown Source)
    at sun.awt.X11.XWindow.preInit(Unknown Source)
    at sun.awt.X11.XComponentPeer.preInit(Unknown Source)
    at sun.awt.X11.XCanvasPeer.preInit(Unknown Source)
    at sun.awt.X11.XWindowPeer.preInit(Unknown Source)
    at sun.awt.X11.XDecoratedPeer.preInit(Unknown Source)
    at sun.awt.X11.XFramePeer.preInit(Unknown Source)
    at sun.awt.X11.XBaseWindow.init(Unknown Source)
    at sun.awt.X11.XBaseWindow.<init>(Unknown Source)
    at sun.awt.X11.XWindow.<init>(Unknown Source)
    at sun.awt.X11.XComponentPeer.<init>(Unknown Source)
    at sun.awt.X11.XCanvasPeer.<init>(Unknown Source)
    at sun.awt.X11.XPanelPeer.<init>(Unknown Source)
    at sun.awt.X11.XWindowPeer.<init>(Unknown Source)
    at sun.awt.X11.XDecoratedPeer.<init>(Unknown Source)
    at sun.awt.X11.XFramePeer.<init>(Unknown Source)
    at sun.awt.X11.XToolkit.createFrame(Unknown Source)
    at java.awt.Frame.addNotify(Unknown Source)
    at Source)
    at Source)
    at java.awt.Component.setVisible(Unknown Source)
    at java.awt.Window.setVisible(Unknown Source)
    at Hello.<init>(

    I know the error is with X11 since the same swing application runs perfectly on anothter machine running ubuntu...
    Please let me know where it fails...

  2. #2

    fixed it....

    thanks all...
    i've fixed it by running xf86config.....


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts