Return-Path: X-Original-To: apmail-pivot-user-archive@www.apache.org Delivered-To: apmail-pivot-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ECB3C10D51 for ; Sun, 4 Aug 2013 10:07:09 +0000 (UTC) Received: (qmail 89299 invoked by uid 500); 4 Aug 2013 10:07:09 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 89094 invoked by uid 500); 4 Aug 2013 10:07:00 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 89086 invoked by uid 99); 4 Aug 2013 10:06:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Aug 2013 10:06:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sandro.martini@gmail.com designates 209.85.215.51 as permitted sender) Received: from [209.85.215.51] (HELO mail-la0-f51.google.com) (209.85.215.51) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Aug 2013 10:06:50 +0000 Received: by mail-la0-f51.google.com with SMTP id fp13so1393312lab.10 for ; Sun, 04 Aug 2013 03:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PAMM6GlAJ5rjpjp2UDUxLTr2HD1wHyZ1PqbPwjo5eog=; b=tPeQIX2Rh3+i8Al0eerkhHi9RQtFuyX0UmS6U3ysSruAmdGwjc+ze7mCTxBidLJpwO lJanJ+h5pRHK33aZYjSJMkK+qubNvPSMzM0MKcQNS8B4nGi2WTgUBlCtUkTxoQDsUPhK HEvyiZfpxtwW3OladeAaYl4/d9mpmvNBYrSh0QnHLewinQbTSoNPVBNMqXwHA1uESMPk biFtpKY8JGbWjQpPM8I1whjoPClIjKMVpm5kA5bP5GTOSwIhBSY3ooygloTJ1F4yLCwZ lNEpi3d5pPrQZRFRiQoYDFBC2jo0iqrea3UXLH7xqiTvjqc4u+vaOAcWPGpCQIcRLezn yYAg== MIME-Version: 1.0 X-Received: by 10.152.121.73 with SMTP id li9mr6392933lab.42.1375610789551; Sun, 04 Aug 2013 03:06:29 -0700 (PDT) Received: by 10.112.131.233 with HTTP; Sun, 4 Aug 2013 03:06:29 -0700 (PDT) Received: by 10.112.131.233 with HTTP; Sun, 4 Aug 2013 03:06:29 -0700 (PDT) In-Reply-To: References: Date: Sun, 4 Aug 2013 12:06:29 +0200 Message-ID: Subject: Re: Running Apache Pivot on the Raspberry Pi From: Sandro Martini To: Users - Apache Pivot Content-Type: multipart/alternative; boundary=089e0117744d75e7b004e31c58d7 X-Virus-Checked: Checked by ClamAV on apache.org --089e0117744d75e7b004e31c58d7 Content-Type: text/plain; charset=ISO-8859-1 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. Bye, Sandro Il giorno 04/ago/2013 00:04, "Erik Innocent" ha scritto: > 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.(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 > > --089e0117744d75e7b004e31c58d7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Hi Erik,
I think you should start X before executing your application ... or maybe d= o 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 thi= s working.

Bye,
Sandro

Il giorno 04/ago/2013 00:04, "Erik Innocent= " <einnocent@gmail.com&g= t; ha scritto:
First, thanks for your help so far. Chris Bartlett, y= our previous answer to my question concerning ShadeDecorator led me to real= ize that I should be using Panel instead of StackPane.

So, my new question. I'm trying to run an Apache Pivot app on the Raspb= erry Pi, but I'm having trouble. This question might be better suited f= or the RPi forums, but I thought I'd start here =3D) Here is my history= so far:

First, I got Raspbian Wheezy running on my RPi (rev. B). The= n I installed the JDK 8 pre-release (ARM, hard-float, non-headless) as desc= ribed here:


And downloaded from here:

http://j= dk8.java.net/download.html

Then I copied t= he HelloJava tutorial (I renamed it "HelloWorld", put it into a p= ackage, and added a main()) and the Pivot JARs onto my RPi.

Then I ran the class file with the command:
<= br>
$ ~/java/jdk1.8.0/bin/j= ava -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:

<= /div>
Exception in thread &q= uot;main" java.awt.HeadlessException:=A0
No X11 DISPLAY variable was set, but this progr= am performed an operation which requires it.

So I added a DISPLAY environment variable as sugg= ested here:


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(X11Gra= phicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment= .java:110)
at java.security.AccessController.doPri= vileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEn= vironment.java:74)
<= span style=3D"white-space:pre-wrap"> at java.lang.Class.forName0(Nat= ive Method)
at java.lang.Class.forName(Class.java:258)
<= /span>at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102= )
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Gr= aphicsEnvironment.java:81)
at org.apache.pivot.wtk= .DesktopApplicationContext.main(DesktopApplicationContext.java:492)<= /div>
at org.apache.pivot.wtk.DesktopApplicationContext.main(Desktop= ApplicationContext.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

--089e0117744d75e7b004e31c58d7--