"Unknown Error in .JavaStart() : Foreign binary jvm could not be loaded" when loading terrJava, parallel or sjdbc package.

"Unknown Error in .JavaStart() : Foreign binary jvm could not be loaded" when loading terrJava, parallel or sjdbc package.

book

Article ID: KB0080231

calendar_today

Updated On:

Products Versions
Spotfire Enterprise Runtime for R All supported versions

Description

Error message similar to the following.

 In .JavaStart() : Could not load foreign binary. C:/Program Files (x86)/Java/jre7/bin/client/jvm.dll: Unknown Error in .JavaStart() : Foreign binary jvm could not be loaded.

This is thrown when loading the "terrJava", "parallel" or "sjdbc" package in TIBCO Enterprise Runtime for R (TERR).

 

Issue/Introduction

"Unknown Error in .JavaStart() : Foreign binary JVM could not be loaded" when loading terrJava, parallel or SDBC package.

Environment

All supported environments

Resolution

The TERR instance's "JAVA_HOME" environment variable has been set to point to a Java Runtime Environment (JRE) whose bitness (32-bit vs 64-bit) does not match the bitness of the TERR instance. Note that in Windows on a 64-bit machine, the string "Program Files (x86)" in a file path indicates that it is the installation path for a 32-bit application.

Solution:

When using 64-bit TERR, set the TERR instance's "JAVA_HOME" environment variable to point to a 64-bit Java Runtime Environment.

When using 32-bit TERR, set the TERR instance's "JAVA_HOME" environment variable to point to a 32-bit Java Runtime Environment.


Background:

To use any of the following packages in TERR,

  parallel
  sjdbc
  terrJava

you must have a bit-matching (32-bit or 64-bit) version of the Java Runtime Environment (JRE) installed. After you have installed a bit-matching version of Java, make certain to set the JAVA_HOME environment variable on your machine to point to the installation path for the Java installation of the correct bitness. Once this is done, restart TERR and load the package again.

You can also set the JAVA_HOME environment variable within the TERR Console session before you load the package, using a call similar to the following:

     Sys.setenv( JAVA_HOME = "C:/Program Files/Java/jdk1.7.0_45" )

Note that R and TERR use the slash ("/") as the file path separator, even on Windows. A single backslash ("\") will not work.

Once this has been done, try to load the package again.