eclipse - 首次启动时加载的匿名工作区

时间:2014-10-12 09:27:53

标签: eclipse

我不知道为什么,但现在,当我启动eclipse(通过gui或命令行,没有任何其他选项)时,它会显示一个没有项目的工作区。因此,要更改工作区,我必须通过菜单手动选择正确的工作区。此匿名工作区指向主页:任何新项目都会自动添加到主文件夹中。

这些是我现在为了拥有一个工作空间而强制执行的步骤:  1.我启动eclipse(没有任何其他选项)  2.它显示匿名工作区(没有项目等)  3.我切换工作区文件>切换工作区> WhateverWorkspace  4.它显示了WhateverWorkspace

此外,匿名工作区仅在启动时显示。我试图在Windows> Preferences> General> Startup and Shutdown> Workspaces中查看工作区列表;没有这个新工作区的迹象。我还尝试编辑/configuration/.settings/org.eclipse.ui.ide.prefs文件,但同样没有家庭工作区的迹象。 还有"启动时提示工作区"选项不起作用。发生了什么事?

现在,如果我单击文件>切换工作区,则无法跟踪匿名工作区。但是,如果在步骤2之后,我创建了一个新项目,则会在主目录中创建。所以,匿名工作区指向我家。

编辑:这是帮助的输出>安装细节>构造

*** System properties:
applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi
awt.toolkit=sun.awt.X11.XToolkit
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=4.4.1.M20140925-0400
eclipse.commands=-os
linux
-ws
gtk
-arch
x86_64
-showsplash
/opt/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925-0400/splash.bmp
-launcher
/opt/eclipse/eclipse
-name
Eclipse
--launcher.library
/opt/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326/eclipse_1605.so
-startup
/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.appendVmargs
-exitdata
4064800c
-product
org.eclipse.epp.package.jee.product
-vm
/usr/bin/java
eclipse.home.location=file:/opt/eclipse/
eclipse.launcher=/opt/eclipse/eclipse
eclipse.launcher.name=Eclipse
eclipse.p2.data.area=@config.dir/../p2/
eclipse.p2.profile=epp.package.jee
eclipse.product=org.eclipse.epp.package.jee.product
eclipse.startTime=1413747456898
eclipse.stateSaveDelayInterval=30000
eclipse.vm=/usr/bin/java
eclipse.vmargs=-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-jar
/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
equinox.use.ds=true
file.encoding=UTF-8
file.encoding.pkg=sun.io
file.separator=/
gosh.args=--nointeractive
guice.disable.misplaced.annotation.check=true
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.printerjob=sun.print.PSPrinterJob
java.class.path=/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
java.class.version=52.0
java.endorsed.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/endorsed
java.ext.dirs=/usr/lib/jvm/java-8-oracle/jre/lib/ext:/usr/java/packages/lib/ext
java.home=/usr/lib/jvm/java-8-oracle/jre
java.io.tmpdir=/tmp
java.library.path=/usr/lib/nvidia-331/:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.8.0_25-b17
java.specification.name=Java Platform API Specification
java.specification.vendor=Oracle Corporation
java.specification.version=1.8
java.vendor=Oracle Corporation
java.vendor.url=[url]http://java.oracle.com/[/url]
java.vendor.url.bug=[url]http://bugreport.sun.com/bugreport/[/url]
java.version=1.8.0_25
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Oracle Corporation
java.vm.specification.version=1.8
java.vm.vendor=Oracle Corporation
java.vm.version=25.25-b02
line.separator=

org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
org.eclipse.debug.ui.breakpoints.toggleFactoriesUsed=true
org.eclipse.equinox.launcher.splash.location=/opt/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925-0400/splash.bmp
org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info
org.eclipse.m2e.log.dir=/home/xxx/.metadata/.plugins/org.eclipse.m2e.logback.configuration
org.eclipse.swt.internal.gtk.useCairo=true
org.eclipse.update.reconcile=false
org.eclipse.update.resolution_url=
org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JavaSE/compact1-1.8,JavaSE/compact2-1.8,JavaSE/compact3-1.8,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6,JavaSE-1.7,JavaSE-1.8
org.osgi.framework.language=en
org.osgi.framework.os.name=Linux
org.osgi.framework.os.version=3.13.0
org.osgi.framework.processor=x86-64
org.osgi.framework.system.capabilities=osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0, 1.1, 1.2",osgi.ee; osgi.ee="JRE"; version:List<Version>="1.0, 1.1",osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8",osgi.ee; osgi.ee="JavaSE/compact1"; version:List<Version>="1.8",osgi.ee; osgi.ee="JavaSE/compact2"; version:List<Version>="1.8",osgi.ee; osgi.ee="JavaSE/compact3"; version:List<Version>="1.8"
org.osgi.framework.system.packages=<content truncated>
org.osgi.framework.uuid=402fed61-c757-0014-1f16-ed19c45e2914
org.osgi.framework.vendor=Eclipse
org.osgi.framework.version=1.8.0
org.osgi.supports.framework.extension=true
org.osgi.supports.framework.fragment=true
org.osgi.supports.framework.requirebundle=true
os.arch=amd64
os.name=Linux
os.version=3.13.0-37-generic
osgi.arch=x86_64
osgi.bundles=reference:file:org.eclipse.osgi.compatibility.state_1.0.1.v20140709-1414.jar,reference:file:org.eclipse.equinox.weaving.hook_1.1.100.weaving-hook-20140821.jar,reference:file:org.eclipse.fx.osgi_1.0.0.201408150502.jar,reference:file:[email]org.eclipse.equinox.simpleconfigurator_1.1.0.v20131217-1203.jar@1[/email]:start
osgi.bundles.defaultStartLevel=4
osgi.compatibility.bootdelegation=true
osgi.configuration.area=file:/opt/eclipse/configuration/
osgi.configuration.area.default=null
osgi.framework=file:/opt/eclipse/plugins/org.eclipse.osgi_3.10.1.v20140909-1633.jar
osgi.framework.extensions=reference:file:org.eclipse.osgi.compatibility.state_1.0.1.v20140709-1414.jar,reference:file:org.eclipse.equinox.weaving.hook_1.1.100.weaving-hook-20140821.jar,reference:file:org.eclipse.fx.osgi_1.0.0.201408150502.jar
osgi.framework.shape=jar
osgi.framework.useSystemProperties=true
osgi.frameworkClassPath=., file:/opt/eclipse/plugins/org.eclipse.osgi.compatibility.state_1.0.1.v20140709-1414.jar, file:/opt/eclipse/plugins/org.eclipse.equinox.weaving.hook_1.1.100.weaving-hook-20140821.jar, file:/opt/eclipse/plugins/org.eclipse.fx.osgi_1.0.0.201408150502.jar
osgi.install.area=file:/opt/eclipse/
osgi.instance.area=file:/home/xxx/
osgi.instance.area.default=file:/home/xxx/
osgi.logfile=/home/xxx/.metadata/.log
osgi.nl=en_US
osgi.os=linux
osgi.requiredJavaVersion=1.6
osgi.splashLocation=/opt/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925-0400/splash.bmp
osgi.splashPath=platform:/base/plugins/org.eclipse.platform
osgi.syspath=/opt/eclipse/plugins
osgi.tracefile=/home/xxx/.metadata/trace.log
osgi.user.area=null
osgi.user.area.default=null
osgi.ws=gtk
path.separator=:
securerandom.source=file:/dev/./urandom
sun.arch.data.model=64
sun.boot.class.path=/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes
sun.boot.library.path=/usr/lib/jvm/java-8-oracle/jre/lib/amd64
sun.cpu.endian=little
sun.cpu.isalist=
sun.desktop=gnome
sun.io.unicode.encoding=UnicodeLittle
sun.java.command=/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar -os linux -ws gtk -arch x86_64 -showsplash /opt/eclipse//plugins/org.eclipse.platform_4.4.0.v20140925-0400/splash.bmp -launcher /opt/eclipse/eclipse -name Eclipse --launcher.library /opt/eclipse/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140603-1326/eclipse_1605.so -startup /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar --launcher.appendVmargs -exitdata 4064800c -product org.eclipse.epp.package.jee.product -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms40m -Xmx512m -jar /opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
sun.java.launcher=SUN_STANDARD
sun.jnu.encoding=UTF-8
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
sun.os.patch.level=unknown
user.country=US
user.dir=/home/xxx
user.home=/home/xxx
user.language=en
user.name=xxx
user.timezone=Europe/Rome

1 个答案:

答案 0 :(得分:0)

我在开发Eclipse插件时遇到了这个问题。我试验了同样的问题:我的插件的一个版本都没问题,我的Eclipse提示我选择工作区,并且以下版本出现与你的相同的问题。

错误是由我引入的,在Eclipse提示用户选择之前,在激活器启动时从我的包中调用Plugin.getStateLocation()::IPath

这会将工作区以编程方式设置为默认值(即~/workspace),不会在您提及的文件中留下任何痕迹。

您必须查看最新安装的插件及其偏好(检查它们是否可以进行延迟初始化)。

希望有所帮助^ _~