[Remoterengine-commits] r117 - pkg/RemoteREngine/exec

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 8 14:55:53 CEST 2009


Author: romain
Date: 2009-09-08 14:55:52 +0200 (Tue, 08 Sep 2009)
New Revision: 117

Modified:
   pkg/RemoteREngine/exec/remoterengine
Log:
silently load rJava if need to find java.home dynamically

Modified: pkg/RemoteREngine/exec/remoterengine
===================================================================
--- pkg/RemoteREngine/exec/remoterengine	2009-09-08 12:50:58 UTC (rev 116)
+++ pkg/RemoteREngine/exec/remoterengine	2009-09-08 12:55:52 UTC (rev 117)
@@ -118,8 +118,11 @@
 java.home <- function( set = FALSE ){
 	JAVA_HOME <- Sys.getenv( "JAVA_HOME", unset = "" )
 	if( JAVA_HOME != "" ){
-		rJava::.jinit()
-		JAVA_HOME <- rJava::.jcall( "java.lang.System", "S", "getProperty", "java.home" )
+		# then find it from rJava
+		require( "methods", silent = TRUE, character.only = TRUE )
+		require( "rJava", silent = TRUE, character.only = TRUE )
+		.jinit()
+		JAVA_HOME <- .jcall( "java.lang.System", "S", "getProperty", "java.home" )
 		if( set ) Sys.setenv( JAVA_HOME = JAVA_HOME )
 	}
 	JAVA_HOME



More information about the Remoterengine-commits mailing list