RNetlogo和NetLogo 5.3错误 [英] RNetlogo and NetLogo 5.3 error
问题描述
我一直将RNetLogo与NetLogo 5.2.1一起使用时没有遇到麻烦.现在,我正在使用NetLogo 5.3,但出现此错误:
I have been using RNetLogo with NetLogo 5.2.1 without troubles. Now I am using NetLogo 5.3 and I get this error:
> library(RNetLogo)
> nl.path <- "/Applications/NetLogo 5.3/"
> NLStart(nl.path, gui = FALSE)
java.lang.NoClassDefFoundError: org/nlogo/workspace/Controllable
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.2 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RNetLogo_1.0-1 igraph_1.0.1 rJava_0.9-8
loaded via a namespace (and not attached):
[1] magrittr_1.5
关于可能是什么问题的任何想法?
Any ideas about what the problem could be?
推荐答案
将行nl.path <- "/Applications/NetLogo 5.3/"
更改为nl.path <- "/Applications/NetLogo 5.3/app"
NetLogo更改了其目录结构; netlogo jar文件现在位于"app"子目录中.
Change your line nl.path <- "/Applications/NetLogo 5.3/"
to nl.path <- "/Applications/NetLogo 5.3/app"
NetLogo has changed its directory structure; the netlogo jar file is now in an 'app' subdirectory.
您可能还需要检查在RNetLogo安装过程中设置的环境变量.
You may also need to check the environment variables that you set up as part of the RNetLogo installation.
这篇关于RNetlogo和NetLogo 5.3错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!