Package: J4R 1.2.2

Mathieu Fortin

J4R: Create 'Java' Objects and Execute 'Java' Methods

Makes it possible to create 'Java' objects and to execute 'Java' methods from the 'R' environment. The 'Java' Virtual Machine is handled by a gateway server. Commands are sent to the server through a socket connection from the 'R' environment. Calls to 'Java' methods allow for vectors so that a particular method is iteratively run on each element of the vector. A score algorithm also makes the calls to 'Java' methods less restrictive. The gateway server relies on the runnable 'Java' library 'j4r.jar'. This library is licensed under the LGPL-3. Its sources are included in the jar file.

Authors:Mathieu Fortin [aut, cre], Alex M Chubaty [ctb], His Majesty the King in right of Canada [cph]

J4R.pdf |J4R.html
J4R/json (API)

# Install 'J4R' in R:
install.packages('J4R', repos = c('', ''))

Peer review:

Bug tracker:


42 exports 0.36 score 0 dependencies 25 downloads

Last updated 6 months agofrom:501eb80648



Readme and manuals

Help Manual

Help pageTopics
Dynamically adds a path or a jar file to the classpath.addToClassPath
Dynamically adds an url to the classpath.addUrlToClassPath
Cast the object into a Java float typeas.float
Create a Java array from an R arrayas.JavaArray
Cast the object into a Java long typeas.long
Length of the buffer when reading from the socket connection.bufferLength
The cache environment of this packagecacheEnv
Synchronize the Java environment with the R environmentcallJavaGC
Call a Java methodcallJavaMethod
Check if a Library has been loadedcheckIfClasspathContains
Connect to Java environmentconnectToJava
Create Java objectscreateJavaObject
Returns all the elements of a Java arraygetAllValuesFromArray
Returns all the elements of a Java instance of ListgetAllValuesFromListObject
Return the length of an Array instancegetArrayLength
Retrieve the paths of the current classloadergetClassLoaderPaths
Retrieve the URLs of the current classloadergetClassLoaderURLs
Get Java architecturegetJavaArchitecture
Get the value of a public fieldgetJavaField
Get the current Java versiongetJavaVersion
Provide a list of the Java referencesgetListOfJavaReferences
Return the main instance in the case of a public servergetMainInstance
Returns the maximum, total and free memory in MbgetMemorySettings
The number of connections to the servergetNbConnections
Return the number of instances stored in the internal map of the Java servergetNbInstancesInInternalMap
Get a value from an arraygetValueFromArray
Interrupt the current task on the Java serverinterruptJava
Check if the java.object instance represents an Arrayis.JavaArray
Checks if the Java server is runningisConnectedToJava
Check if the java.object instance represents an ArrayisJavaArray
The current version of the J4R Java serverJ4R_Server_Version
Set a default memory size for the Java Virtual Machinej4r.config.setDefaultJVMMemorySize
Enabling/disabling Verbosej4r.config.setVerbose
Force the JVM to shut downkillJava
Override the default length
Override the default length
Maximum length of the vector in the parameters.maxVectorLength
Using multithreading with J4Rmclapply.j4r
Print a java.list
Print a java.object
Set the value of a public fieldsetJavaField
Set the path to JavasetJavaPath
The settings environment for this packagesettingEnv
Set a value in an arraysetValueInArray
Shut down R clientshutdownClient
Shut down JavashutdownJava