Install IB Gateway on RaspberryPi

从 Oracle 官网下载安装 jdk8

从 IB 官网下载 IB Gateway for Linux

使用二进制模式修改 ibgateway-stable-standalone-linux-x86.sh

$ vim -b ~/ibgateway-stable-standalone-linux-x86.sh

INSTALL4J_JAVA_HOME_OVERRIDE 赋值为安装的 jdk8 的路径

INSTALL4J_JAVA_HOME_OVERRIDE="/opt/jdk1.8.0_191/"

修改 test_jvm() 函数,删除版本检查的逻辑

  if [ "$ver_major" = "" ]; then
    return;
  fi
-  if [ "$ver_major" -lt "1" ]; then
-    return;
-  elif [ "$ver_major" -eq "1" ]; then
-    if [ "$ver_minor" -lt "8" ]; then
-      return;
-    elif [ "$ver_minor" -eq "8" ]; then
-      if [ "$ver_micro" -lt "0" ]; then
-        return;
-      elif [ "$ver_micro" -eq "0" ]; then
-        if [ "$ver_patch" -lt "152" ]; then
-          return;
-        fi
-      fi
-    fi
-  fi
-
-  if [ "$ver_major" = "" ]; then
-    return;
-  fi
-  if [ "$ver_major" -gt "1" ]; then
-    return;
-  elif [ "$ver_major" -eq "1" ]; then
-    if [ "$ver_minor" -gt "8" ]; then
-      return;
-    elif [ "$ver_minor" -eq "8" ]; then
-      if [ "$ver_micro" -gt "0" ]; then
-        return;
-      elif [ "$ver_micro" -eq "0" ]; then
-        if [ "$ver_patch" -gt "152" ]; then
-          return;
-        fi
-      fi
-    fi
-  fi

  app_java_home=$test_dir
}

安装 IB Gateway

$ ./ibgateway-stable-standalone-linux-x86.sh

安装完成后直接执行 IB Gateway 会提示

No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be 1.8.0_152.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.

需要使用同样的方式修改 ~/Jts/ibgateway/972/ibgateway