I had this exact same issue, and it was because the bit size of R didn't match the bit size of Java (i.e. 32-bit R with 64-bit Java or vice-versa). I resolved this by re-installing Java and re-initializing R to confirm they were both 64 bit.