今天公司刚买来一台服务器,配置安装java开发环境的时候,MyEclipse无法启动,查看日志文件之后,具体错误信息如下:
!SESSION 2012-09-18 09:56:44.412 -----------------------------------------------eclipse.buildId=M20080221-1800java.version=1.6.0_21java.vendor=Sun Microsystems Inc.BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CNCommand-line arguments: -os win32 -ws win32 -arch x86 -clean!ENTRY org.eclipse.equinox.app 2012-09-18 09:56:54.570!MESSAGE Product com.genuitec.myeclipse.product.ide could not be found.!ENTRY org.eclipse.osgi 4 0 2012-09-18 09:56:54.607!MESSAGE Application error!STACK 1java.lang.RuntimeException: No application id has been found. at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:236) at org.eclipse.equinox.internal.app.EclipseAppContainer.start(EclipseAppContainer.java:98) at org.eclipse.equinox.internal.app.Activator.addingService(Activator.java:112) at org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(ServiceTracker.java:1064) at org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(ServiceTracker.java:926) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:330) at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:274) at org.eclipse.equinox.internal.app.Activator.start(Activator.java:54) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:37) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:405) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.core.internal.runtime.PlatformActivator.startAppContainer(PlatformActivator.java:47) at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:32) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)咋看之下,太熟悉了,因为myeclipse是直接从我本地机器拷贝到服务器上面的,路径指向不对,所以立马去G:\MyEclipse 6.5\eclipse\links文件夹里面修改com.genuitec.eclipse.MyEclipse.link这个配置文件,修改之后,发现无果,还是取法启动。
具体修改信息如下:path=G:/MyEclipse 6.5/myeclipse
然后google一下,发现有很多解决办法,总结一下:
1、安装在中文文件夹里面(本人开发一般使用英文文件夹,无果);
2、JDK版本和MyEclipse不兼容(有可能,没试过);
3、以管理员身份运行(这位仁兄太有才了);
4、重新安装;
5、删除MyEclipse其它多余文件;
查询完毕之后发现以上信息对我都没用,突然我想到一个问题,会不会因为服务器操作系统和我本地操作系统不一样,路径识别不了导致MyEclipse无法启动?
具体修改信息如下:(去掉以前路径的空格)
1、MyEclipse安装文件MyEclipse 6.5改为MyEclipse6.5
2、path=G:/MyEclipse 6.5/myeclipse改为path=G:/MyEclipse6.5/myeclipse
OK,如此修改之后,顺利启动。