Exception in thread "main" java.awt.HeadlessException

S

SpreadTooThin

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
 
P

paul.cager

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).
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top