Exception in thread "main" java.awt.HeadlessException

Discussion in 'Java' started by SpreadTooThin, Apr 15, 2013.

  1. I am having trouble getting a jar file to run properly.
    1st I had logged into the Raspberry from my MAC using XQuartx xterm

    bash-3.2$ssh -X pi@raspberrypi
    pi@raspberrypi ~ $ echo $DISPLAY
    localhost:10.0
    pi@raspberrypi ~ $wish

    I checked the xwindows system and found the following.
    And I get wish's display on my mac as an x-window.
    But when I run my java installation jar file I get this:

    pi@raspberrypi ~ $ java -version
    java version "1.7.0_10"
    Java(TM) SE Embedded Runtime Environment (build 1.7.0_10-b18, headless)
    Java HotSpot(TM) Embedded Client VM (build 23.6-b04, mixed mode)


    pi@raspberrypi ~ $ java -jar MY-installer.jar
    Exception in thread "main" java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:535)
    at java.awt.Frame.<init>(Frame.java:420)
    at java.awt.Frame.<init>(Frame.java:385)
    at javax.swing.JFrame.<init>(JFrame.java:180)
    at org.xxxx.installer.Installer.<init>(Installer.java:62)
    at org.xxxx.installer.Installer.main(Installer.java:53)
    pi@raspberrypi ~ $

    So.. What's going on? Any ideas?
    I installed java from
    http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html
    ARMv6/7 Linux - Headless EABI, VFP, SoftFP ABI, Little Endian1
    SpreadTooThin, Apr 15, 2013
    #1
    1. Advertising

  2. SpreadTooThin

    Guest

    On Monday, 15 April 2013 04:53:09 UTC+1, SpreadTooThin wrote:
    > I am having trouble getting a jar file to run properly.
    >
    > 1st I had logged into the Raspberry from my MAC using XQuartx xterm
    > I installed java from
    >
    > http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html
    >
    > ARMv6/7 Linux - Headless EABI, VFP, SoftFP ABI, Little Endian1


    You have installed the "reduced footprint" *headless* version of the Java runtime on your Pi, so it doesn't support GUIs. You will need to install a full version of Java (not the embedded version).
    , Apr 15, 2013
    #2
    1. Advertising

  3. SpreadTooThin

    Roedy Green Guest

    On Sun, 14 Apr 2013 20:53:09 -0700 (PDT), SpreadTooThin
    <> wrote, quoted or indirectly quoted someone who
    said :

    > Exception in thread "main" java.awt.HeadlessException


    see http://mindprod.com/jgloss/runerrormessages.html#HEADLESSEXCEPTION
    --
    Roedy Green Canadian Mind Products http://mindprod.com
    Computer programming is the best remedy for pain (physical or emotional)
    I have encountered. It requires so much concentration there is nothing left
    over to pay attention to the pain. They should teach this in AA.
    Roedy Green, Apr 15, 2013
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Mark Bram
    Replies:
    2
    Views:
    5,953
    Robert Mark Bram
    Dec 11, 2003
  2. vizlab

    HeadlessException Error

    vizlab, Dec 12, 2004, in forum: Java
    Replies:
    1
    Views:
    2,191
    Gerard Krupa
    Dec 13, 2004
  3. Replies:
    2
    Views:
    2,153
  4. Replies:
    0
    Views:
    2,388
  5. Warren Tang
    Replies:
    6
    Views:
    1,840
    Warren Tang
    Jun 9, 2009
Loading...

Share This Page