I'm not a *nix guru, though I can follow guides and the basic concepts. With that in mind, the only way I've figured out how to view a Pivot app on the RPi is to see the graphics output from within the window manager (LXDM, after calling 'startx'). This means doing startx, then either going to another tty via, say, ctrl-alt-f2, or opening the run dialog in LXDM via alt-f2. From there, I call a script that launches the Pivot app. If in tty, I go back to the window manager via ctrl-alt-f7. My current script, as an example, can be found here:
https://gist.github.com/einnocent/6207649 So the good news is that Pivot runs on the RPi. The bad news? Things are unusably slow. I'm doing mostly scaling and placement of SVGs within a panel, with maybe a dozen labels, so I'm guessing it's not my app doing anything crazy intensive. (Or am I wrong?) I've a few ideas for speeding things up, namely: - Using JRE8 instead of JDK8. I don't expect this to yield big gains and can't wait for the official release of Java 8 next year ( http://openjdk.java.net/projects/jdk8/). - Using a faster memory card. I also don't expect much from this as I'm not doing much disk operation and I don't think I'm swapping out to the SD - Using a faster computer, using Windows. More expensive and less elegant - Using a faster computer, using Linux. More expensive and I could have similar issues - Using JavaFX. I'd have to learn another framework, but then I could avoid X, which I think is what's slowing things down (I think the graphics are being handled by the CPU instead of the GPU). I don't know if JavaFX takes advantage of the GPU, but the dedicated link here ( http://www.oracle.com/technetwork/java/javafx/overview/index.html) seems to indicate some level of support. - Using Weston/Wayland (http://wayland.freedesktop.org/raspberrypi.html). Getting Wayland running on the RPi has been a pain and I'm still not there yet. I'm guessing it will be built into an upcoming release of Raspian, but I can't wait for that. I also worry if it will even help, since the app will be going through XWayland ( http://wayland.freedesktop.org/xserver.html). - Using pivot-fx? I'd like to try this but the project ( https://code.google.com/a/apache-extras.org/p/pivot-fx/) appears to be dormant. Anyone know what's going on with this? So, does anyone have any suggestions on how to speed things up? Any input on my ideas? And does anyone know what's going on with pivot-fx? I'd really like to get a Pivot app running on the RPi, I think it would be really cool =) Thank you so much for your help! --E El domingo, 4 de agosto de 2013, Sandro Martini escribió: > 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" <[email protected]> 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.<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 s > >
