B4J Tutorial B4J and Raspberry Pi boards

Discussion in 'B4J Tutorials' started by Erel, Jan 23, 2014.

  1. Erel

    Erel Administrator Staff Member Licensed User

    Raspberry Pi is a low-cost Linux board:

    [​IMG]

    B4J v1.50 adds support for these boards.

    Here are two screenshots:

    DBUtils:
    [​IMG]

    Moving smiley:
    [​IMG]

    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:
    Code:
    /<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:
    Code:
    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.basic4ppc.com/android/forum/threads/server-building-web-servers-with-b4j.37172/
     
    Last edited: Feb 3, 2014
  2. Theera

    Theera Well-Known Member Licensed User

    Can we change fonts by using linuxmint's fonts? (I need to be sure,it can use Thai fonts too)
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    I haven't tried it. Though I expect it to work.
     
  4. engvidal

    engvidal Member Licensed User

    HI

    Anyone tried it with beaglebone black ??
     
  5. JakeBullet70

    JakeBullet70 Active Member Licensed User

    Is the program running from the command line or from the GUI?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I ran it from the command line. You can probably create a shortcut and run it from the GUI.
     
    Theera likes this.
  7. JakeBullet70

    JakeBullet70 Active Member Licensed 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?
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    I haven't tested if, however I believe that it will work without the GUI desktop. It runs in a full screen mode that is not related to the desktop.
     
  9. Peter Simpson

    Peter Simpson Well-Known Member Licensed User

    I'll have a go at playing about with my Raspberry Pi and a little test app that I wrote when playing about with B4J :cool:
     
  10. salim safran

    salim safran Member Licensed 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.
     
  11. JakeBullet70

    JakeBullet70 Active Member Licensed 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 .
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    I guess that you are asking about slow startup on Raspberry Pis. JavaFX apps are not slow on other platforms.

    The link you posted is not related to these boards.
     
  13. udg

    udg Well-Known Member Licensed 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
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    HDMI cable with DVI connector so you will be able to connect the device directly to a monitor.
     
  15. udg

    udg Well-Known Member Licensed 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
     
  16. MaFu

    MaFu Active Member Licensed 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.
     
  17. udg

    udg Well-Known Member Licensed User

    Thank you, Manfred.
    Can wait for my already issued order to be delivered...
     

Share This Page

Loading...