Raspbian Stretch Javafx "Cannot open Display" - javafx

I'm trying to get a GUI Javafx application running on my Raspberry Pi 3 with touchscreen. Javafx is installed using Gluon, version armv6hf-sdk. When trying to run the program using this code:
sudo '/usr/bin/java' -jar /home/pi/NetBeansProjects//BarSystem/dist/BarSystem.jar
I get the following error:
Cannot open display
Exception in Application start method
java.lang.reflect.InvocationTargetException
It makes no difference if i try to run in remotely using NetBeans or directly on the Pi. The Pi is connected to the official 7" touchscreen and running Stretch Lite.
Java version is "1.8.0_201". I managed to get the application running on my Raspberry Pi 2 about a year ago, but are unable to achieve the same on my new pi. I already tried this https://raspberrypi.stackexchange.com/questions/76789/javafx-cannot-open-display-problem, but it didn't solve my problem.
I also tried to use lxterminal, but then receive a similar error:
(lxterminal:899): Gtk-WARNING **: cannot open display:
Thanks in advance!

Related

QT wayland Failed to create display (No such file or directory)

I am trying create a qt5 application on yocto using qtwayland. When I run my application, the 'Apllication Output' displays this error
"Failed to create display (No such file or directory) Application
finished with exit code 1." .
However, the bin file actually has successfully been deployed and I can run it on my board by opening the file manually. I can't debug on my board,either.
How can I figure it out, thank you.
I assume you are trying to create a Qt client application and run it on a wayland server?
On Wayland, Failed to create display (No such file or directory) means that a Wayland client couldn't connect to the compositor/display server.
So you should verify that your compositor is running. Which one are you using?
The environment variable, XDG_RUNTIME_DIR, also needs to be set both when the compositor is started and when your client is started.
If clients start when you run them on the device, it might be that the default platform for your qt installation is eglfs, not Wayland. In order to run the applications on Wayland, start it like this:
./myapp -platform wayland
or set
export QT_QPA_PLATFORM=wayland
Note that if you are running a Qt-based compositor, then the compositor should probably still be run with the eglfs backend

Setup Qt remotely deploy with board

so here's the question..
I'm developing a embedded linux program using qt 4.7..
I was able to cross compile and run withou success, but i'm trying to run thru my pc Qt (with remotely deploy) I was able to initialize and connect with ssh and i get "test successfull" when i make it with qt option.
I searched that i needed to include the target path in the project to solve "Cannot run: no command given"
The problem is, when i add:
target.files = EmbeddedSystem
target.path = /home/plg
INSTALLS += target
to the .pro, i get the error "error: SFTP initialization failed: The SFTP server finished unexpectedly with exit code 127."
Btw, i'm using mini6410.. Thanks!!
This error might comes from your ssh server/client on your embedded device.
Running the connexion test successfully doesn't mean that you can transfer files using SFTP.
If you are using OpenSSH then it is ok but Dropbear (for example) is a lightweight server/client that supports ssh but not SFTP.

Run Qt app with eglfs plugin on a normal computer

I am trying to run a Qt application under EGLFS with Linux Mint on a Macbook Pro.
I have:
Configured and compiled Qt with all the needed flags and dependences.
Tried to run the app with X11 turned off.
Used kms integration.
Installed all the Mesa drivers ( I have an intel GPU ).
Even compiled EGL myself.
But it keeps saying "Unable to create EGL Display".
Does anyone knows what am I missing ?
P.S For example I can run weston-launch which I believe it runs over drm-egl.
I had the same problem like you. I have solved it by:
Building Qt with "-opengl desktop" switch.
Making conf file with my displays (look at: http://doc.qt.io/qt-5/embedded-linux.html at section "eglfs with eglfs_kms backend") inside application directory
Exporting QT_QPA_EGLFS_KMS_CONFIG=conf
Then switch to free tty and run application with -platform eglfs argument.

R Code on Windows IoT Core 10

I want to run R Code on Windows IoT Core 10, is there any possibility for this?
I have tried to upload the R installation directory from my local PC to the Windows IoT core 10 device (Raspberry Pi 3)
Then from Power Shell I am executing following command Rscript.exe testscript.R but I get following error
Program 'Rscript.exe' failed to run: The operation completed successfully.
CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
FullyQualifiedErrorId : NativeCommandFailed
Is it possible at all to run R-Code on Windows IoT 10 core?
Any help is appreciated please.
EDIT :
I tried it from native command prompt on Windows IoT Core 10, and it gives error "The system cannot execute the specified program." So it looks like that it is not supported? Any suggestion/possibilities?
You need to recompile R completely for ARM or you can use Raspbian, its better than recompiling code anyway.
As written in this Blog there is just support for languages like:
C++
C#
JS
VB
Node.js and Python

Getting started with playn - eclipse

I followed all the instructions for setting up the environment in eclipse indigo EE. I did it both in ubuntu 12.04 64bit and Windows 7 64bit, and everything goes good till the point when I try to run the imported example (showcase-java). the build fails and following error appears in the eclipse console:
Failed to execute goal on project playn-showcase-java: Could not resolve dependencies for project com.googlecode.playn:playn-showcase-java:jar:1.0-SNAPSHOT: Could not find artifact com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT in forplay-legacy (http://forplay.googlecode.com/svn/mavenrepo) -> [Help 1]
Note that I follow all the instructions on Getting Started page and I'm sure I'm not missing out on anything mentioned there on the page.
Hi here is a more detailed tutorial on how to set up eclipse with playn link
May be this is helpful for you.

Resources