revert to previous configuration from command-line?

断了今生、忘了曾经 提交于 2019-12-10 03:39:56

问题


I have a problem running eclipse. After installing 3 plugins (from TeXlipse), i have an error:

!ENTRY org.eclipse.osgi 4 0 2012-01-21 13:57:28.430
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry.

I tried to run it with eclipse -clean but this does not help.

Is there a way to revert to previous configuration from the command line? I googled it, but see only GUI solutions from within the IDE. I'm not even sure if that feature is available by default, or it's an additional plugin.

If i'm to remove installed plugins manually, is it enough just to delete appropriate folders/files in eclipse/plugins? I see two folders new:

net.sourceforge.texlipse_1.5.0
de.vonloesch.pdf4eclipse.help_1.0.0.20111116150

and also two files:

de.vonloesch.pdf4Eclipse_1.0.1.201111161450.jar
org.bibsonomy.texlipseextension_0.1.0.jar

Thank you in advance for your help

p/s/ I run Eclipse IDE for Parallel Application Developers (includes Incubating components) in Ubuntu 11.10 with SVN/EGit plugins on top. And now TeXlipse.

UPDATE1:

i was trying to run something like this: ./eclipse -application org.eclipse.equinox.p2.director -uninstallIU de.vonloesch.pdf4eclipse.help_1.0.0.201111161450 -profile epp.package.parallel

or

./eclipse -application org.eclipse.equinox.p2.director -revert 1327068337804 -profile epp.package.parallel

but it just runs the app and don't "listen" to command-line arguments...

UPDATE2:

that's what I have when I try to start p2 from OSGi console (which can be started via ./eclipse -console -noexit):

osgi> start 166
org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.p2.console_1.0.300.v20110502-1955 [166]" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.internal.provisional.p2.director; version="0.0.0"

回答1:


One way to do this is to invoke p2 using the OSGi console. Look through the instructions on the link, you will see the command to revert your Eclipse.

If that does not work (that is, you cannot get Eclipse started to use the console), then you can use the p2 director application and specify -revert.




回答2:


I could launch eclipse (once!) with

/Applications/eclipse/Eclipse.app/Contents/MacOS > ./eclipse -clean

than I removed the last installed plugin, which may have caused the problem... It didn't help.

When you got an error similar to

java.lang.ExceptionInInitializerError at org.eclipse.wb.internal.core.preferences.PreferenceInitializer.initializeDefaultPreferences(PreferenceInitializer.java:50)

you can try to delete the following file

rm workspace/.metadata/.plugins/org.eclipse.core.resources/.snap

So what happened: I can start eclipse and within eclipse I could chose revert installation [ECLIPSE -> About -> INSTALLATION HISTORY]

So my workaround should allow to to start eclipse and perform further steps.



来源:https://stackoverflow.com/questions/8953267/revert-to-previous-configuration-from-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!