pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Running Apache Pivot on the Raspberry Pi
Date Sun, 04 Aug 2013 10:06:29 GMT
Hi Erik,
I think you should start X before executing your application ... or maybe
do a shell script that start X and then your application.

Note: X server of Raspbian is compatible with Java ? Just to be sure ...

For faster tests, try with a Linux distribution (on a VM or a real PC),
close X and try the same steps ...

Tell us for updates, could really be interesting to have this working.

 Il giorno 04/ago/2013 00:04, "Erik Innocent" <einnocent@gmail.com> ha

> First, thanks for your help so far. Chris Bartlett, your previous answer
> to my question concerning ShadeDecorator led me to realize that I should be
> using Panel instead of StackPane.
> So, my new question. I'm trying to run an Apache Pivot app on the
> Raspberry Pi, but I'm having trouble. This question might be better suited
> for the RPi forums, but I thought I'd start here =) Here is my history so
> far:
> First, I got Raspbian Wheezy running on my RPi (rev. B). Then I installed
> the JDK 8 pre-release (ARM, hard-float, non-headless) as described here:
> https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi
> And downloaded from here:
> http://jdk8.java.net/download.html
> Then I copied the HelloJava tutorial (I renamed it "HelloWorld", put it
> into a package, and added a main()) and the Pivot JARs onto my RPi.
> Then I ran the class file with the command:
> $ ~/java/jdk1.8.0/bin/java -cp
> pivot-core-2.0.2.jar:pivot-wtk-2.0.2.jar:pivot-wtk-terra-2.0.2.jar:.
> com.einnocenttech.HelloWorld
> The first error I got was:
> Exception in thread "main" java.awt.HeadlessException:
> No X11 DISPLAY variable was set, but this program performed an operation
> which requires it.
> So I added a DISPLAY environment variable as suggested here:
> http://stackoverflow.com/questions/5218870/getting-a-headlessexception-no-x11-display-variable-was-set#comment5870539_5218870
> So now I do:
> $ echo $DISPLAY
> localhost:0.0
> And then I try running HelloWorld again, and I get the following error
> which I cannot get past:
> Exception in thread "main" java.awt.AWTError: Can't connect to X11 window
> server using 'localhost:0.0' as the value of the DISPLAY variable.
>  at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> at
> sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
>  at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
> at java.security.AccessController.doPrivileged(Native Method)
>  at
> sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
> at java.lang.Class.forName0(Native Method)
>  at java.lang.Class.forName(Class.java:258)
> at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
>  at
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
> at
> org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:492)
>  at
> org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:870)
> at com.einnocenttech.HelloWorld.main(HelloWorld.java:21)
> I suspect that I either need to start an X server, or have a better
> DISPLAY variable. Any thoughts?
> Thanks!
> --E

View raw message