我正在使用GATE.ac.uk。scr代码在eclipse中,露娜,java 1.8。我在执行start时遇到问题,GATE application.it显示的错误如下:
“初始化过程中出错: gatel:util.GateRuntimeException:Could未推断已安装的插件的位置!请使用启动脚本中的-Dgate.plugins.home选项手动设置它。是否仍要启动GATE?”
Console: log4j:WARN找不到记录器(gate.Gate)的附加器。log4j :警告请正确初始化log4j系统。log4j:WARN更多信息请参见http://logging.apache.org/log4j/1.2/faq.html#noconfig。
如果您知道哪个版本的eclipse用于GATE开发,请告诉我。
然后,如果您知道此错误的解决方案&请让我知道插件(启动脚本中的-Dgate.plugins.home选项)配置步骤。
发布于 2016-10-10 13:42:28
你也可以在你的代码中定义它。下面的示例首先定义GateHome和PluginsHome的位置。正如kundan所写的,你也可以将插件目录复制到你的项目目录中。
if(Gate.getGateHome() == null)
Gate.setGateHome(new File("C:/Program Files (x86)/GATE_Developer_8.2"));
if(Gate.getPluginsHome() == null)
Gate.setPluginsHome(new File("C:/Program Files (x86)/GATE_Developer_8.2/plugins"));
Gate.init();
// register the needed plugins
Gate.getCreoleRegister().registerDirectories(new File(Gate.getPluginsHome(), "yourPlugin").toURI().toURL());
发布于 2015-02-27 18:14:30
您需要将GATE安装附带的plugins
文件夹的路径告诉eclipse。以下是对我起作用的方法。
步骤1:将plugins
文件夹从C:\Program Files (x86)\GATE_Developer_8.0
复制到项目根文件夹( .project
和.classpath
所在的位置)
步骤2:在eclipse中,右键单击项目-->Run As
-->单击Run Configurations
--> Goto Arguments
选项卡,并将以下内容粘贴到VM Argument
下
"-Dgate.plugins.home="${project_loc}\plugins"
PS:您还需要以类似的方式复制gate.xml
并在VM Arguments
中提供。这就是我是如何做到的。-Dgate.site.config="${project_loc}\gate.xml"
https://stackoverflow.com/questions/28313692
复制相似问题