轉載自:http://stackoverflow.com/questions/7019912/using-the-rjava-package-on-win7-64-bit-with-r Here is some quick advice on how to get up and running with R + rJava on Windows 7 64bit. There are several possibilities, but most have fatal flaws. Here is what worked for me: Add jvm.dll to your PATH rJava, the R<->Java bridge, will need jvm.dll, but R will have trouble finding that DLL. It resides in a folder like
or
Wherever yours is, add that directory to your windows PATH variable. (Windows -> "Path" -> "Edit environment variables to for your account" -> PATH -> edit the value.) You may already have Java on your PATH. If so you should find the client/server directory in the same Java "home" dir as the one already on your PATH. To be safe, make sure your architectures match.If you have Java in Re-launch R from the Windows Menu If R is running, quit. From the Start Menu , Start R / RGUI, RStudio. This is very important, to make R pick up your PATH changes. Install rJava 0.9.2. Earlier versions do not work! Mirrors are not up-to-date, so go to the source at www.rforge.net: http://www.rforge.net/rJava/files/. Note the advice there
That is almost correct. This actually works:
Watch the punctuation! The mysterious “.libPaths()[1],” just tells R to install the package in the primary library directory. For some reason, leaving the value blank doesn’t work, even though it should default. |
解決rJava無法找到jvm.dll的問題
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.