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_1.2.2.tar.gz
J4R_1.2.2.zip(r-4.5)J4R_1.2.2.zip(r-4.4)J4R_1.2.2.zip(r-4.3)
J4R_1.2.2.tgz(r-4.4-any)J4R_1.2.2.tgz(r-4.3-any)
J4R_1.2.2.tar.gz(r-4.5-noble)J4R_1.2.2.tar.gz(r-4.4-noble)
J4R_1.2.2.tgz(r-4.4-emscripten)J4R_1.2.2.tgz(r-4.3-emscripten)
J4R.pdf |J4R.html
J4R/json (API)

# Install 'J4R' in R:
install.packages('J4R', repos = c('https://predictiveecology.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/cwfc-ccfb/j4r/issues

On CRAN:

42 exports 2.08 score 0 dependencies 12 scripts 33 downloads

Last updated 8 months agofrom:501eb80648. Checks:OK: 7. Indexed: no.

TargetResultDate
Doc / VignettesOKSep 20 2024
R-4.5-winOKSep 20 2024
R-4.5-linuxOKSep 20 2024
R-4.4-winOKSep 20 2024
R-4.4-macOKSep 20 2024
R-4.3-winOKSep 20 2024
R-4.3-macOKSep 20 2024

Exports:addToClassPathaddUrlToClassPathas.floatas.JavaArrayas.longbufferLengthcacheEnvcallJavaGCcallJavaMethodcheckIfClasspathContainsconnectToJavacreateJavaObjectgetAllValuesFromArraygetAllValuesFromListObjectgetArrayLengthgetClassLoaderPathsgetClassLoaderURLsgetJavaArchitecturegetJavaFieldgetJavaVersiongetListOfJavaReferencesgetMainInstancegetMemorySettingsgetNbConnectionsgetNbInstancesInInternalMapgetValueFromArrayinterruptJavais.JavaArrayisConnectedToJavaisJavaArrayJ4R_Server_Versionj4r.config.setDefaultJVMMemorySizej4r.config.setVerbosekillJavamaxVectorLengthmclapply.j4rsetJavaFieldsetJavaPathsettingEnvsetValueInArrayshutdownClientshutdownJava

Dependencies:

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 functionlength.java.list
Override the default length functionlength.java.object
Maximum length of the vector in the parameters.maxVectorLength
Using multithreading with J4Rmclapply.j4r
Print a java.list objectprint.java.list
Print a java.object instanceprint.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