Eclipse Product 的启动过程
来源:互联网 发布:兔展微信场景制作软件 编辑:程序博客网 时间:2024/06/01 19:35
参考自:http://niub.iteye.com/blog/1807588
双击eclipse安装目录下的 eclipse.exe ,会加载同一目录下的 eclipse.ini 文件。示例:
-startupplugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar--launcher.libraryplugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502-productorg.eclipse.epp.package.rcp.product--launcher.defaultActionopenFile-showsplashorg.eclipse.platform--launcher.XXMaxPermSize256M-vmargs-Dosgi.requiredJavaVersion=1.5-Xms40m-Xmx512m
<一> Eclipse 的JVM 启动时,找JRE 的顺序。
如果eclipse.ini中配置了-vm参数,那么则使用这个参数指定的JRE(jvm.dll库路径);
否则,查看eclipse安装目录下是否有JRE文件夹,如果有的话就使用这个JRE;
否则,去系统注册表中查找安装的JRE,如果还找不到就报错。
<二>eclipse.ini
-startup 指定启动的入口为:安装目录下plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
会加载该jar包中的org.eclipse.equinox.launcher.Main.class类并调用其main(String)完成app的启动过程。
public static void main(String[] args) { int result = 0; ... result = new Main().run(args); ...}run() 方法会调用 basicRun() 方法。basicRun() 方法如下:
protected void basicRun(String[] args) throws Exception { //记录启动启动时间 System.getProperties().put("eclipse.startTime", Long.toString(System.currentTimeMillis())); //$NON-NLS-1$ commands = args; //处理Command参数,并根据Command参数设置默认属性 String[] passThruArgs = processCommandLine(args); if (!debug) // debug can be specified as system property as well debug = System.getProperty(PROP_DEBUG) != null; setupVMProperties();//将VM参数写入到System.Properties中processConfiguration();//加载配置信息getInstallLocation();//获取安装路径,这里调用一下是为了确保InstallLocation被初始化// locate boot plugin (may return -dev mode variations)URL[] bootPath = getBootPath(bootLocation);//获取启动路径列表setupJNI(bootPath);//启动JNIBridge,加载dll类库//检查JDK版本if (!checkVersion(System.getProperty("java.version"), System.getProperty(PROP_REQUIRED_JAVA_VERSION))) return;//检查配置信息if (!checkConfigurationLocation(configurationLocation))return;setSecurityPolicy(bootPath);//设置安全策略handleSplash(bootPath);//启动闪屏,就是Eclipse(或RCP启动时IDE打开前带有进度条的界面)beforeFwkInvocation();invokeFramework(passThruArgs, bootPath);//加载框架(前面的工作都是辅助,这个才是加载框架的核心)}<三> 各个方法简要说明,
1.processConfiguration():处理配置信息 ,通过 config.ini 文件。
2.getInstallLocation(): 获取当前安装路径。
3.getBootPath():获取启动路径列表 。
4.setupJNI():启动JNIBridge,加载dll类库 。
5.invokeFramework():启动Equinox框架 。
0 0
- Eclipse Product 的启动过程
- Eclipse启动过程
- Eclipse启动过程
- Eclipse启动过程
- 彻底删除eclipse里的product
- Export Eclipse Product 的一些小事
- 两例Eclipse不能启动Tomcat服务的处理过程
- Eclipse基础--Eclipse启动过程
- Eclipse基础--Eclipse启动过程
- Eclipse基础--Eclipse启动过程
- Eclipse基础--Eclipse启动过程
- Eclipse Product扩展
- 启动eclipse报Version 1.6.0_65 of the JVM is not suitable for this product.
- Linux的启动过程
- jboss的启动过程
- uboot的启动过程
- symbian 的启动过程
- linux 的启动过程
- IP数据报首部校验和算法
- OpenGL: 颜色立方体
- Android历史与版本变迁
- boost库在dev c++的使用
- 网站打开慢之学习mysql慢查询和linux top命令
- Eclipse Product 的启动过程
- Lua开发效率
- 黑马程序员_Inherits、CodeFile、CodeBehind的区别
- linux下查看cpu物理个数和逻辑个数
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- MAC OSX10.9 下编译使用OGRE1.9及CEGUI 0.8.3(二)OGRE Templates的使用
- hdu 1006 Tick and Tick
- Struts2的动态result
- Android Handler类消息传递机制(二)同一类(或内部类)中使用Handler