B4J Tutorial B4J and Raspberry Pi boards

New tutorial based on Java 11: Raspberry Pi with Java 11

The first step is to download and run B4J-Bridge: Remote debugging with B4J-Bridge


Raspberry Pi is a low-cost Linux board:

SS-2014-01-23_11.32.59.jpg


B4J v1.50 adds support for these boards.

Here are two screenshots:

DBUtils:
SS-2014-01-23_11.36.26.jpg


Moving smiley:
SS-2014-01-23_11.37.04.png


Out of the box the default OS includes Java 7. However it doesn't include JavaFX libraries.
Non-UI applications will work with this version.

If you want to run UI applications then you need to install Java 8: https://jdk8.java.net/download.html
You need to download Linux ARMv6/7 VFP, HardFP ABI.
Copy it to the board and unpack it. There is no installation step. You should use the full path from the terminal.

For example:
B4X:
/<path to jdk1.8>/jre/bin/java -jar DBUtils.jar

UI apps will run in a full screen mode. You cannot resize the window and there is no close button. Be sure to include one in your program. You can also kill it through SSH:
B4X:
ps -A|grep java
kill <pid>

You will probably need to add more memory to the video card in the board settings, otherwise you will see all kinds of OpenGL errors.

The performance is quite bad. Especially the loading time. However it is usable.

I was a bit surprised to see that even the SQLite driver worked on the first time.

WebView and HtmlEditor nodes are not supported. MediaPlayer is also not supported.


You can also run server applications on these boards: http://www.b4x.com/android/forum/threads/server-building-web-servers-with-b4j.37172/
 
Last edited:

Theera

Well-Known Member
Licensed User
Longtime User
Can we change fonts by using linuxmint's fonts? (I need to be sure,it can use Thai fonts too)
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
I am wondering if it needs the GUI or if it is providing its own graphic layer.
I mean, what if the GUI - desktop is not installed?
 

salim safran

Member
Licensed User
Longtime User
very promising updates, will get one PI today and check it out, also will order OlinuXino and BBB, it is very exciting progress.
thank you.
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
Has anyone looked into the JavaFX slow startup?
I found this here as others have complained about it.
I do not have a PI yet and am still debating on buying one .
 

udg

Expert
Licensed User
Longtime User
Hi all,

I'd like to give a try to this Rasperry stuff, so can you advice on what I should buy?
Its main use will be that of a B4J server visible to outside world to test websockets-based apps both web-based and B4A based.

I guess that I need as a minimum a Rev. B board (which OS?) and a power supply, but there are a few cheap options that sound promising to extend the board usability (SDHC card, 150Mbps wireless adapter, a case..).

So, what is your advice?

TIA,
Umberto
 

udg

Expert
Licensed User
Longtime User
Thanks Erel,

I did forget to mention the cable..

Which OS would you recommend?
Any preference to an SDHC card size? The larger the better?

Is this a device we can leave on H24 or eventually should we worry about temperature issues or low-grade electronics?
Maybe I should ask that to the manufacturer, but here I'm just curious about your hands-on experience and feeling with the board.

Umberto
 

MaFu

Well-Known Member
Licensed User
Longtime User
Use the current Raspbian image from the Pi download site, it's the best solution except you would use it as media machine only.
And many use the Pi as 24/7 server, so no worries about heating.
 

udg

Expert
Licensed User
Longtime User
Thank you, Manfred.
Can't wait for my already issued order to be delivered...
 
Last edited:

jcredk

Member
Licensed User
Longtime User
Hi all,
I am getting here from the 1st B4J page (https://www.b4x.com/b4j.html). But I was not able to find a post explaining with more detail how to setup the environment to implement applications for Pi.
Did I miss a link please?

PS: my Pi is the B+ version with Raspbian
 

jcredk

Member
Licensed User
Longtime User
Hi Michael,
According to your login name we are probably born on the same year!
I had a look to the url you gave: it seems very promising ...
I will dig there until I have new questions ... or not.

Thanks, and happy new year to all ... a bit in advance!
 

Mark Turney

Active Member
Licensed User
Longtime User
Top