Mycontroller on Raspberry PI (RPI)



  • Hi All,

    I am working with Mycontroller for quite some time now on the RPI, works like a charm!!
    however for on thing, and this was already mentioned in the release notes, you have to use Oracle java instead of the opensource java.

    The issue is that if you are using the opensource java version the software responds slow, it becomes really annoying after some time..... So, today i decided to install the Oracle version of Java, and that made a HUGE difference!! Mycontroller is responding really fast and snappy now on the RPI!. below are the steps i found to install oracle java

    Before you start, make sure you have a backup of the RPI flash card, or at least you Mycontroller database!! (and of course on a different disk.......).

    I downloaded the 32bit version.... (Linux ARM 32 Hard Float ABI 77.77 MB jdk-8u101-linux-arm32-vfp-hflt.tar.gz)

    http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, click the download button of Java Platform (JDK) 8. Click to Accept License Agreement, download jdk-8-linux-arm-vfp-hflt.tar.gz for Linux ARM v6/v7 Hard Float ABI.

    (If you are running your RPI headless you need to download the software and sftp it in binary mode into your RPI)

    • goto the directory where you downloaded the software.
    • sftp user@192.168.178.111 (192.168.178.111 is just an example, use the IP / hostname of the RPI)
    • bin
    • hash
    • put jdk-8u101-linux-arm32-vfp-hflt.tar.gz
    • press control-D to close the connection.

    Once the software is uploaded:

    1. Log-in Raspberry Pi, enter the command to extract jdk-8u101-linux-arm32-vfp-hflt.tar.gz to /opt directory.
      $ sudo tar zxvf jdk-8u101-linux-arm32-vfp-hflt.tar.gz -C /opt

    2. Set default java and javac to the new installed jdk8.
      $ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_101/bin/javac 1
      $ sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_101/bin/java 1

    $ sudo update-alternatives --config javac
    $ sudo update-alternatives --config java

    1. After all, verify with the commands with -verion option.
      $ java -version
      $ javac -version

    (Source: http://www.rpiblog.com/2014/03/installing-oracle-jdk-8-on-raspberry-pi.html)

    Take my advice, you will not regret this, My controller is really great software and it runs even better now!!

    Tag.

    NOTE: If you plan to use RPI native serial port, you should enable serial port for user. By default it will be used for RPI console access. You may follow this tutorial to disable console output on RPI serial port.


  • ADMIN

    @Tag Thank you for the great feedback and support!



  • Before you start installing Java maybe first check if you already have the "right" java version?

    pi@raspi ~ $ apt list --installed | grep java
    
    WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.
    
    java-common/stable,now 0.52 all  [installiert]
    javascript-common/stable,now 11 all  [Installiert,automatisch]
    libjavascriptcoregtk-3.0-0/now 2.4.8-2+rpi1 armhf  [Installiert,aktualisierbar auf: 1:2.4.1-1rpi53rpi1g]
    oracle-java8-jdk/stable,now 8u65 armhf  [installiert]
    
    
    pi@raspi ~ $ cat /etc/os-release
    PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="8"
    VERSION="8 (jessie)"
    ID=raspbian
    ID_LIKE=debian
    HOME_URL="http://www.raspbian.org/"
    SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
    BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
    

    Got one of the more recent versions of raspbian and didn't have to install anything at all. Although I don't get any charts/images but might this be related to java?



  • True always check first,
    However in my case my image did not contain the correct java version ;)



  • @Tag,Your post on Mycontroller on Raspberry Pi was really very helpful. Thank You.



5
Online

309
Users

206
Topics

1216
Posts

Looks like your connection to MYCONTROLLER.ORG was lost, please wait while we try to reconnect.