我想将安装的Eclipse Oxygen(2018年4月3日)和数据从Ubuntu 16转移到新机器上的Ubuntu 18的全新安装中。我不确定是否会引起麻烦,但是由于Eclipse似乎从未真正安装过,因此我尝试复制以下目录:
〜/ eclipse(安装目录)
〜/ .eclipse
〜/ .p2
〜/ eclipse-workspaces
当我第一次复制所有内容并尝试启动Eclipse时,它可以正确启动,并且一切运行正常。我将其关闭并重新启动计算机。从那时起,当我尝试启动它时,出现以下错误:
!SESSION Thu Jan 24 05:38:45 GMT 2019 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2019-01-24 05:38:45.057
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.RuntimeException: Could not find framework
at org.eclipse.equinox.launcher.Main.getBootPath(Main.java:1009)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:570)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
eclipse二进制文件位于我的PATH中,因此我一直试图通过从终端运行命令eclipse
来启动它。
我注意到一些配置文件不正常。所有换行符均已替换为文字“ \ n”字符。例如,以下configuration/config.ini
文件具有以下内容:
#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Thu Jan 24 05:21:14 GMT 2019
org.eclipse.update.reconcile=false
eclipse.p2.profile=_home_rfynes_eclipse_eclipse
osgi.instance.area.default=@user.home/workspace
osgi.framework=file\:../../.p2/pool/plugins/org.eclipse.osgi_3.12.100.v20180210-1608.jar
equinox.use.ds=true
eclipse.buildId=4.7.3.M20180330-0640
ds.delayed.keepInstances=true
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.2.1.v20180131-1435.jar@1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=org.eclipse.platform.ide
osgi.splashPath=file\:/home/rfynes/.p2/pool/plugins/org.eclipse.platform_4.7.3.v20180330-0640
osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=file\:/home/rfynes/.p2/\neclipse.application=org.eclipse.ui.ide.workbench
...但是我必须用适当的换行符手动替换所有文字“ \ n”。在我这样做之前,整个文件内容都在一行上。对config.ini文件执行完此操作后,尝试启动Eclipse时,日志中出现了另一个错误:
!SESSION 2019-01-24 10:33:48.758 -----------------------------------------------
eclipse.buildId=4.7.3.M20180330-0640
java.version=1.8.0_191
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_IE
Framework arguments: -product org.eclipse.epp.package.javascript.product --launcher.defaultAction
openFile --launcher.appendVmargs
-startup ../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.javascript.product --launcher.defaultAction
openFile --launcher.appendVmargs
-startup ../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
!ENTRY org.eclipse.osgi 4 0 2019-01-24 10:33:49.077
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
大概还有其他配置文件像这样处理过吗? Eclipse正在编写这些文件,但是为什么要这样做呢?如果这是问题的原因,那么这可能是Eclipse的问题,还是我的系统有问题?