Learn R Programming

⚠️There's a newer version (1.0.8) of this package.Take me there.

The J4R package

The J4R package is licensed under the GNU General Public License v3.0 (GPL-3).

The J4R package makes it possible to execute native Java code in an R environment. More specifically, it allows to create Java objects and to invoke Java methods, whether they are static or not. The package is based on a local Java server that is instantiated through a Java library packaged as j4r.jar. This Java library is licensed under the Lesser GNU General Public License v3.0 (LGPL-3). Both the J4R package and the j4r Java library come with absolutely NO WARRANTY.

The source code of the J4R package and the j4r library is freely available at https://sourceforge.net/p/repiceasource/code/HEAD/tree/trunk/ .

The documentation can be found at https://sourceforge.net/p/repiceasource/wiki/J4R/ .

Tickets can be created at https://sourceforge.net/p/repiceasource/tickets/ .

Mathieu Fortin e-mail: mathieu.fortin.re@gmail.com

Copy Link

Version

Install

install.packages('J4R')

Monthly Downloads

23

Version

1.0.7

License

GPL-3

Maintainer

Mathieu Fortin

Last Published

April 14th, 2020

Functions in J4R (1.0.7)

isArray

Check if the java.object instance represents an Array
isConnectedToJava

Checks if the Java server is running
getJavaField

Get the value of a public field
getJavaArchitecture

Get Java architecture
getArrayLength

Return the length of an Array instance
getClassLoaderURLs

Retrieve the URLs of the current classloader
shutdownJava

Shut down Java
cacheEnv

The cache environment of this package
getJavaVersion

Get the current Java version
getMemorySettings

Returns the maximum, total and free memory in Mb
getValueFromArray

Get a value from an array
setJavaPath

Set the path to Java
maxVectorLength

Maximum length of the vector in the parameters.
getListOfJavaReferences

Provide a list of the Java references
setValueInArray

Set a value in an array
setJavaField

Set the value of a public field
createJavaObject

Create Java objects
checkIfClasspathContains

Check if a Library has been loaded
callJavaGC

Synchronize the Java environment with the R environment
getAllValuesFromListObject

Returns all the elements of a Java instance of List
connectToJava

Connect to Java environment
getAllValuesFromArray

Returns all the elements of an array
addUrlToClassPath

Dynamically adds an url to the classpath.
callJavaMethod

Call a Java method
bufferLength

Length of the buffer when reading from the socket connection.