So I have tried the previously proposed answer to my question. but I am still having the same error message:
I am trying to load the rJava library in R
For me the problem was caused because a 32-bit Java version was installed on the system, but I was running 64-bit version of R. Installing the 64-bit Java version solved the problem with rJava namespace environment. Because I am running a 32-bit browser I had to manually download the 64-bit Java version.