So the general consensus so far has been that in order to run on ARM (raspberry pi), you need to use the legacy launcher, and rather than using the packaged Java that is normally downloaded with the launcher, you need to install java ahead of time. Since on the Raspberry Pi, raspian has only been 32-bit (even though hardware is 64 bit), there have been some compatibility issue with some modules (like JxBrowser for example only supports 64 bit ARM architecture).
Now, there are some ready to run 64 bit packages for raspberry pi, so it seems like we should be able to get over this. I went ahead and loaded up a 64 bit āRaspberry Pi OSā package (no longer called raspbian) and installed Java. When I download and run the .desktop, nothing happens. If I manually try to run the .jar file with this format ājava -cp launcher.jarā, I get an error message telling me that it is expecting an AMD 64 platform, and not a AARCH64 platform.
So is there another launcher out there that does work with the AARCH64 platform? The legacy launcher still works, but being on 64bit doesnāt seem to solve any of the incompatibilities that come along with it (JxBrowser). Or is it that JxBrowser isnāt compatible with my Java version? According to their website it should be fine? https://jxbrowser-support.teamdev.com/docs/quickstart/requirements.html
Raspi Client:
Java Version: Open JDK 14.0.2
Debian 10.4
Ignition Server:
Web Browser Module 4.0.15
Ignition 8.0.14
Weāre working on upgrading to JxBrowser 7.x, which should overcome the lack of support in the 6.x version (aka, the version currently used in Ignition). The 7.x update is a complete rewrite of the JxBrowser library, and only recently released 7.10 which we believe solves some issues that were preventing us from upgrading. Weāll be testing this update and hopefully be able to move forward with it. No ETA, but hopefully in one of the next couple releases.
As far as I understand, there should be appropriate support from Azul and JavaFx, but weāll need to do some verification. If true, then weāll start evaluating any remaining issues/considerations for adding support.
Ok, that makes sense. JxBrowser ARM 64 support was recently added, but it hasnāt made itās way into Ignition yet. Looking forward to that!
Iāll do some more playing around to see if I can get the current Linux launcher to work on an ARM system. As of right now, as long as I modify the .sh file so it uses the locally pre-installed java version instead of the packaged version, Iām able to get the application selection window to open. Unfortunately, I canāt actually run anything; if I try, it dies pretty much silently. This is all thatās in the log:
INFO [GatewayConnect ] [2020/08/20 13:53:50]: Attempting to connect to gateway http://192.168.0.1:8088...
INFO [LaunchUtil ] [2020/08/20 13:53:52]: Starting Java with the following parameters: nohup /home/pi/.ignition/cache/resources/runtimes/11.0.6/bin/java -classpath /home/pi/.ignition/clientlauncher-data/launchclient.jar -Djavaws.sr.gateway.addr.0=http://192.168.0.1:8088 -Djavaws.sr.launchts=1597946032597 -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.sr.platform.edition= -Djavaws.sr.platform.plugins= -Xms32M -Xmx256M -Djavaws.sr.memory.init=32M -Djavaws.sr.memory.max=256M -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=C -Djavaws.sr.project=RFIDDev com.inductiveautomation.ignition.client.launch.BootstrapSwing &
Hereās my .sh file that actually opens the application selection box:
#! /bin/bash
##Launches an instance of the Vision Client Launcher
# Get the location of the script.
REALDIR=$(cd "$( dirname "${BASH_SOURCE[0]}")" && pwd)
# Logging if error
LAUNCHER_LOGFILE="${REALDIR}/../visionclientlauncher.log"
LOG_MSG="ERROR [LauncherApplication ] [$(date +"%Y/%m/%d %T")]:"
#if [ "$(getconf LONG_BIT)" != "64" ]; then
# "${REALDIR}/../runtime/bin/./java" --version
# if [ $? -ne 0 ]; then
# echo "${LOG_MSG} 64-bit OS not detected. This launcher must run on a 64-bit OS." | tee -a "${LAUNCHER_LOGFILE}"
# fi
#fi
#update the .desktop icon
sed -i 's,Icon=launcher.png,'"Icon=${REALDIR}\/launcher.png"',' "${REALDIR}/../visionclientlauncher.desktop"
#"${REALDIR}/../runtime/bin/./java" -jar "${REALDIR}/launcher-vision-client-linux.jar" $@ >/dev/null 2>&1 &
java -jar "${REALDIR}/launcher-vision-client-linux.jar" $@ >/dev/null 2>&1 &
AFAIK, javafx should be included in the version of java Iām running. Iām now on Liberica Full OpenJDK 64-Bit 14.0.2 + 13
I thought that was the whole idea of the workaround here: using the system java and not the bundled Java. I think using the java in the .ignition folder like you suggested would be the same as running the launcher without any modifications?
Ohhh, I didnāt realize what you were trying to tell me here until now. So, this is essentially what the launcher runs when you click the application.
Error: Could not find or load main class com.inductiveautomation.ignition.client.launch.BootstrapSwing
Caused by: java.lang.ClassNotFoundException: com.inductiveautomation.ignition.client.launch.BootstrapSwing
I think weāre talking past each other here. Iām trying to help you open the Vision Client. That command line I posted is what the launcher runs. You can manually run it replacing just the runtime path, not the JAR it points at, and get a Vision Client to launch with your system Java. Thatās all.
Opening the launcher is irrelevant right now because the from what I can tell the launcher canāt use the system Java to launch a Vision Client. Itās always trying to use the embedded runtime to launch the Vision Client.
I wouldnāt recommend going this route (using the Launchers on ARM) as the javafx required libs may be incomplete or incompatible on some systems.
The latest error you are seeing is because the jar that spins up a client is missing on your system, the launchers (and the legacy launcher) grab this for you from the gateway you are targeting, so you definitely want to use the legacylauncher script in your case.
That being said, the launchers JSON (.ignition/clientlauncher-data/vision-client-launcher.json) has two fields within it for each application that allows you to point it to a locally installed application for launching:
These allow you to override the retrieval and launching against the JRE bundled with the target gateway. It is recommended that you use a current and compatible version of java 11 for this since all of our testing is done against the version we bundle with that gateway.
Ok that makes sense now, if I want to use the system java and not the packaged java, I need to open the vision client directly and not through the launcher unless I modify that json file.
Ok, yep, the legacy launch .sh script worked with the v8 linux launcher. Fantastic! Pending just a few items, I think I should be completely finished:
Install JRE/JDK v11 for ARM64 instead of v14 (I'll have to check that JavaFX is still supported in those revs)
Wait for new rev of JxBrowser that supports ARM64 (Could I possibly get a beta version?)
OK, I'll give it a shot anyway and see if it works out. So far so good though...
Do you have any better suggestions for ARM? Or just avoid vision on ARM entirely? (or keep using swing??)
Thanks so much guys for your help here!
You can definitely use Vision for clients (via the legacy launch script and your own JRE) and your web browser for Perspective, but any designing in the Designer should probably be done on a different machine, at least for now.