需求场景,eclipse命令行启动,自动导入指定目录的项目
bat文件中的使命解释
start d:/eclipse/eclipse.exe -data d:/eclipse/workspace -application test.myapp.App -import L:\code
注释:
-data d:/eclipse/workspace 指定工作空间
-application test.myapp.App 加载插件
-import L:\code 导入项目
问题:test.myapp.jar包放入D:\eclipse\dropins和D:\eclipse\plugins均不起作用
提示: Application "test.myapp.jar" could not be found in the registry.
解决步骤:
1、百度错误提示:
重复修改插件的代码运行版本;
删除D:\eclipse\configuration\org.eclipse.update目录;
执行eclipse -clean
均不起作用,启动后加载不了插件,无法实现
2、最后怀疑已经安装使用了四五年的eclipse Neon.3 Release (4.6.3)+jdk1.8+tomcat7.0(绿色版)有问题
重新eclipse官网下载javaEE版本,重新安装,将插件放入plugins下可以自动识别运行
3、确认问题在eclipse后,使用beyond compare比较两个eclipse后,确认问题在
D:\eclipse\configuration\consig.ini文件中的org.eclipse.update.reconcile=false
改为org.eclipse.update.reconcile=true后,可正常加载插件
4、将插件放入D:\eclipse\plugins
删除D:\eclipse\configuration\org.eclipse.update目录;
执行eclipse -clean
启动后正常加载插件,实现需求
在/configuration/config.ini文件中加入一行 osgi.checkconfiguration=true 这样它会寻找并安装插件,找到后可以把那行再注释掉,这样以后每次启动就不会因寻找插件而显得慢了。
此句话未验证