Error thrown when loading terrJava, parallel or sjdbc package: "Error in .JavaStart() : can't load terrJava: JAVA_HOME not set".
book
Article ID: KB0080337
calendar_today
Updated On:
Products
Versions
Spotfire Enterprise Runtime for R
All supported versions
Description
Description: Error seen when attempting to load the parallel, sjdbc or terrJava package.
------------------------------------------- > library(parallel) Loading required package: terrJava Error in .package.execute.initialization.function(ns, ".onLoad", dirn... : error executing function '.onLoad' from package 'terrJava' loaded from C:/Program Files/TIBCO/terr44/library : Error in .JavaStart() : can't load terrJava: JAVA_HOME not set -------------------------------------------
In addition to the above error, the parallel and sjdbc packages also return the following error directly after the error shown above:
------------------------------------------- Error in .package.execute.initialization.function(ns, ".onLoad", dirn : error executing function '.onLoad' from package 'parallel' loaded from C:/Program Files/TIBCO/terr44/library : Error in function(libname, pkgname) { jar1 <- system.file("java",... : could not find function ".JavaAttachClassPath" -------------------------------------------
Symptoms: Error thrown when loading terrJava, parallel, or sjdbc library: "Error in .JavaStart() : can't load terrJava: JAVA_HOME not set".
Cause: JAVA_HOME environment variable has not been set correctly.
Issue/Introduction
Error thrown when loading terrJava, parallel or sjdbc package: "Error in .JavaStart() : can't load terrJava: JAVA_HOME not set".
Environment
All supported environments
Resolution
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, also make certain to set the JAVA_HOME environment variable on your machine to point to the installation path to your Java installation. Once this is done, restart TERR and load the library again. Alternatively, you can also set the JAVA_HOME environment variable within the TERR console before you load the library, using a call similar to the following: