B4J Question Help Reqruied : Raspberry Pi - UI Apps

paragkini

Member
Licensed User
Longtime User
Hi,
Need help in running UI apps on Raspberry Pi.

My obvious option was one thread where
"Erel said:
You can use Java 7 or Java 8u6 to run UI apps. The layout will not be perfect but it should work."
Have read many threads on this and did exactly the same. (given all the links at the bottom and texts).

After two three road blocks and re-flashing the OS, got everything installed (Java 8 and JFX).
So when I run my UI app, I don't get any error anymore.

Problem: My app runs without error but nothing shows on the screen. There is no error on the command prompt or B4J logs (if run from there, both debug and release mode.)

Can some help me running UI app. (My objective of buying RPi was to run this app for my kids' studies. Tried running it with "sudo" access also.

My versions:
jdk-8u60-linux-arm32-vfp-hflt.tar.gz
openjfx-8u40-sdk-overlay-linux-armv6hf.zip


Steps followed: (versions will differ, my versions given above)

Step 1: Download http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-arm32-vfp-hflt.gz (http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-arm32-vfp-hflt.gz)
Step 2: sudo tar zxvf jdk-8u73-linux-arm32-vfp-hflt.tar.gz -C /opt ->installs in /opt
Step3: sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_73/bin/javac 1
Step4 :sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_73/bin/java 1
Step5: sudo update-alternatives --config javac
Step6: sudo update-alternatives --config java
Step7: download http://108.61.191.178/downloads/openjfx-8u40-sdk-overlay-linux-armv6hf.zip (http://108.61.191.178/downloads/openjfx-8u40-sdk-overlay-linux-armv6hf.zip)
Step8: sudo unzip openjfx-8u40-sdk-overlay-linux-armv6hf.zip -d /opt/jdk1.8.0_73


Links followed:

https://www.b4x.com/android/forum/t...on-on-raspberry-pi-help-needed.63403/#content
https://www.b4x.com/android/forum/t...-i-run-ui-apps-on-it.62704/reply?quote=395986
http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/RaspberryPiFX/raspberryfx.html
https://www.b4x.com/android/forum/t...b4j-from-the-scratch.59784/reply?quote=381603
https://www.b4x.com/android/forum/threads/iot-linux-embedded-boards-gettings-started.60430/#content
http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/javaseembedded8u6-2406243.html
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
 

paragkini

Member
Licensed User
Longtime User
That's pretty cool. Thanks a lot.

I connect my RPi to my 4K TV (55") - May be that's the problem of resolution.
I will try to play with the resolution before I try options given by you.

Once more, thanks a lot for your help... Will get back ASAP.
 
Upvote 0

paragkini

Member
Licensed User
Longtime User
yipee.. application started.
But as you said, screen resolution is an issue. even i created a sample app with just a button, that too isn't showing well.
need to deep dive, I believe.

Additionally, one strange thing observed.
When I run the app (I connected normal monitor with RPi) and connected to this RPi using VNC from my laptop.
When I run any UI app, RPi (where monitor is connected) shown a big blank screen and a small rectangle of UI app.

Surprisingly thing is that, VNC screen on my laptop doesn't shown this app screen. It continues to show the terminal screen. And since My UI app is not working properly, I can kill the process from VNC on my laptop.

My doubt: VNC is supposed to replicate the screen of host. In this case it is showing two different screens (theoretically... )

Any views?
 
Upvote 0

paragkini

Member
Licensed User
Longtime User
One more finding.
When app starts, it should ideally show the screen from 0,0 (top left corner) position. But my test app (created a new one to test these issues) opens somewhere like -10 or 20 / - 10 or 20 (that is top left is not visible. Will share screenshot (need to take it from phone).

Also, found one link which am referring for troubleshooting.

https://www.raspberrypi.org/forums/viewtopic.php?f=67&t=25933

Note: In all this, I see my app only on the display (monitor) connected to RPi directly. Same time connected VNC shows only terminal screen. I have to use VNC connection to close the application cos mouse pointer doesn't move out till the app is running.
 
Upvote 0

rboeck

Well-Known Member
Licensed User
Longtime User
Hi, if you work on a tv and use it as a monitor, you should look for "tv overscan" in your tv manual. Because historical reasons each tv picture is 10 to 20 points bigger as it is shown! The tv reduces this points and now you are missing them. It has nothing to do with the raspberry, each pc would have the same problem.
 
Upvote 0

paragkini

Member
Licensed User
Longtime User
This is happening on my monitor... would it behave the same? Anyways, tonight will be checking on the TV also.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…