1
votes

I get this error message while trying to load the rJava or the openNLP packages through the function library(openNLP) or library(rJava):

Error: package or namespace load failed for ‘rJava’: .onLoad in loadNamespace() for 'rJava' failed, details: call: dirname(this$RuntimeLib) error: a character vector argument expected

I have no problems loading other packages, e.g. NLP. Does somebody know what the problem is?

2
Try installing rJava once again.amrrs
This could be a red herring, but can you post what you get when you run the R command .libPaths()? The only place in the source code I can see that error being thrown is based on the result of a call to that function... might be worth seeing what it's working withTim Hirst
I installed rJava again and received the same error message. The command .libPaths() returns two paths of the library where rJava is stored: [1] "C:/Users/Documents/R/win-library/3.4" "C:/Program Files/R/R-3.4.2/library"tal tal
Hmmm.. take it you got no errors when installing the packages?Tim Hirst
Right, no errors. I get the message that rJava is successfully unpacked and I still get the error message when I try to load it with the library() function.tal tal

2 Answers

1
votes

I have updated the Java SE Development Kit and now I get no error message anymore. So this seems to be the solution for the problem.

1
votes

I solved this problem by installing Java SE Development Kit 8.

Link for Download: http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html