简体   繁体   中英

Error in using R-extension: Mac OS X El Capitan, NetLogo 5.2.1

I'm getting the error "Error in R-Extension: Error in runOnce: java.lang.NullPointerException" when I try to use the r-extension. A similar question was given in NetLogo R Extension Installation Error in Mac OS X Yosemite but I'm wondering if running Mac OS El X Capitan is causing a problem. I'm running NetLogo 5.2.1. I have followed the instructions on the R-extension page, and have modified the Info.plist file with the following code according to the developer instructions.

<key>NSJavaRoot</key>
<string>..</string>
<key>LSEnvironment</key>
<dict>
<key>JRI_HOME</key>
<string>/Library/Frameworks/R.framework/Resources/library/rJava/jri</string>
<key>R_HOME</key>
<string>/Library/Frameworks/R.framework/Resources</string>
</dict>
</dict>
</plist>. 

When I run the r-extension systemcheck, it says that my JAVA_HOME and JRI_HOME variables are "null". I'm not sure why I'm still not setting the environment for these variables correctly. Can someone please help with what I'm missing? I also tried loading the rJava package again, but it did nothing.

You should try,

<key>NSJavaRoot</key>
<string>..</string>
<key>LSEnvironment</key>
<dict>
<key>JRI_HOME</key>
<string>/Library/Frameworks/R.framework/Resources/library/rJava/jri</string>
<key>R_HOME</key>
<string>/Library/Frameworks/R.framework/Resources/library/rJava/jri</string>
</dict>
</dict>
</plist>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM