Installing and Configuring JRI - deborahvm/ECommerceApp GitHub Wiki

After cloning the ECommerceApp repository and installing the CloudSim 3.0.3, DVFS CloudSim package, and R dependencies, you'll need to install and configure the JRI.

1 Install rJava


[Windows] Add the R.ddl folder on windows path.

C:\Program Files\R\R­2.15.2\bin\{x64 or i386}

[Linux] Make sure that your LD_LIBRARY_PATH variable contains your libjvm.so. Type on your terminal:

export LD_LIBRARY_PATH=`sudo locate libjvm.so`

Now open the R software and install rJava:

install.packages("rJava")

2 Configuring JRI on Eclipse


Add JRI.jar to the EComerceApp project:

Right click your ECommerceApp project > Properties > Java Build Path > Select Libraries tab > Add JARs...

Add the R_HOME variable and set its value with /usr/lib/R on Linux or C:\Program Files\R\R­2.15.2 on Windows

Run ­> Run Configuration ­> Select Environment tab > New...

Locate the JRI installation folder. Type on R:

system.file("jri",package="rJava")

Now, add the ­Djava.library.path variable in Eclipse and set its value with the previous command output.

Run ­> Run Configuration ­> Select Arguments tab ­> VM arguments

[Windows] Example:

­-Djava.library.path=<jri_folder>\{x64 or i386}

[Linux] Example:

­-Djava.library.path=.:/home/user/R/x86_64­pc­linux­gnu­library/2.15/rJava/jri/

⚠️ **GitHub.com Fallback** ⚠️