开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: Install TWS or IB gateway on Ubuntu and ARM64 bit processor


 

My apologies for the confusion, Todd. As I said in my post, I only have an old 32bit Raspberry Pi 2 and was unable to make TWS/IBGW work on it. My next step would have been to grab a modern Pi 4, install a 64bit Debian distribution (instead of Raspbian) and try again with a 64bit JVM. It looked like 64bit ARM Java offerings were much more rich than 32bit ones. But you are correct, a 64bit JVM will not work on a 32bit OS.

Having said that, I went back to the drawing board and did some experiments on the Pi2 with 32bit OS and and 32bit JVMs. I installed the 32bit Linux versions of TWS and IBGW 981.3g and got pretty far, but not all the way. Here some thoughts that may help you:

  • IBKR installation packages contain a Java JVM 1.8.0_152 with embedded JavaFX libraries. So the IBKR code relies upon pre-Java 9 rules related to access between classes from different origins and jars.
  • Java 8 versions of JavaFX do exist for ARM 32bit, but they are missing some of the SWING related classes IBKR uses (such as JFXPanel).
  • After Java 8, JavaFX became a separate set of modules and more stringent module access rules apply
With that background I did these steps:
  • Download the stable Linux 32bit versions of IBGW and TWS. That is 981.3g right now
  • Install the IBKR package with an ARM 32bit Java8 JVM:
    • app_java_home="path-to-arm-java-jre" sh ibgateway-stable-standaline-linux-x86.sh
    • The installation uses your ARM JRE (instead of the packaged x86 JRE) and JavaFX is not required at this stage
  • Install a full featured JavaFX version that includes all SWING classes plus the corresponding JVM. After some experimenting I went with
    • openjfx-17.0.1_linux-arm32_bin-sdk.zip
    • OpenJDK17U-jdk_arm_linux_hotspot_17.0.1_12.tar.gz
  • Small modification to the ibgateway script (in my case located in ~/Jts/ibgateway/981)
    • At the bottom at the two exec java statements insert right after ...bin/java"
    • --module-path path-to-your-javafx-installation/lib --add-modules=ALL-MODULE-PATH
    • They have to be located at the front of the command line options and adding them to the vmoptions file will not work
  • Start IBGW with
    • app_java_home="path-to-your-java-JVM"? sh "~/Jts/ibgateway/981/ibgateway"
    • I had to do that as the root user since JavaFX tried to access all kinds of restricted devices related to mice, video, audio. But that could be an issue with my old Pi 2 and OS installation.
  • The login dialogue comes up but I cannot get past the 2FA challenge (long story, but the only account I can use for the test needs this). All input works fine but IBGW claims that I had entered an incorrect security code (which I did not)
  • launcher.log and the start script show a few exceptions related to module access restrictions to certain JavaFX classes. Most likely because of the more stringent module security enforced by the JVM. That can probably be worked around with proper module-info files, but will need some work and probably requires repackaging of IBKR JARs.
  • Starting TWS 981.3g works with the same recipe. Logging into a demo account eventually hangs in "Processing startup parameters ..."
Hope this helps,
闯ü谤驳别苍

PS. Contact me directly if you want to work on this some more, since this the nitty gritty is probably too far out of scope for the group.








Join [email protected] to automatically receive all group messages.