Change .eclipse folder in Linux(在 Linux 中更改 .eclipse 文件夹)
问题描述
如何在 Linux 中更改 .eclipse 文件夹?我尝试添加这一行:
How can I change the .eclipse folder in Linux? I tried adding this line:
-Dosgi.configuration.area=/directory/directory1/eclipse/.eclipse
在 eclipse.ini 的顶部,但它不起作用.我也尝试将它添加到 eclipse.ini 中的其他各个地方,但仍然没有运气.
at the top of eclipse.ini but it doesn't work. I've also tried adding it to various other places in the eclipse.ini but still no luck.
我已经添加了这一行:
-Dosgi.configuration.area=file:/directory/directory1/eclipse/.eclipse
就在 -vmargs 的下方.当 Eclipse 启动时,它现在从正确的 .eclipse 位置读取,如果 .eclipse 不存在,它会创建它.不幸的是,加载 Eclipse 后,在我的主文件夹中创建了另一个 .eclipse 文件夹,然后 Eclipse 继续从该文件夹中读取.我怀疑我的 eclipse.ini 文件现在是正确的,但我需要更改另一个文件.
immediately below -vmargs. When Eclipse starts, it now reads from the correct .eclipse location and if .eclipse does not exist there, it creates it. Unfortunately, after Eclipse has loaded, another .eclipse folder is created in my home folder and Eclipse then continues to read from that folder. I suspect that my eclipse.ini file is now correct but there is another file I need to change.
推荐答案
最简单的做法可能是向 java 传递一个不同的 user.home
以便所有其他无数的地方派生一个位置以 user.home
为基础.因此,请在 .ini
文件中使用它:
The simplest thing to do is probably pass java a different user.home
so that all the other myriad of places that derive a location base it off of user.home
. So instead of what you have, use this in .ini
file:
-Duser.home=/directory/other/here
除了 .eclipse 之外,您可能还会发现在您覆盖的 user.home
中创建的其他目录,例如 .p2
、.oracle_jre_usage
等
In addition to .eclipse, you will probably find other directories created in your overridden user.home
, such as .p2
, .oracle_jre_usage
, etc.
其他说明:
-Dosgi.configuration.area
是Eclipse 的配置区更改,不影响用户区.您可能也不想更改默认设置,除非您真的想要多个配置(阅读下文).
-Dosgi.configuration.area
is the changes the configuration area for Eclipse, it does not effect user area. You also probably don't want to change that setting away from the default unless you really want multiple configurations (read more below).
另外,通常的做法是使用 -configuration
作为 eclipse{.exe}
的参数,并让 eclipse 将其转换为适当的 VM 参数.
Additionally, the normal thing to do would be to use -configuration
as an argument to eclipse{.exe}
and let eclipse convert it to the appropriate VM argument.
您可能希望 -user
覆盖用户区域.看看 Eclipse 帮助中的位置 了解更多信息(引用如下).
You probably want -user
though to override the user area. Have a look at locations in the Eclipse help for more info (quoted below).
但是,仍然有一些东西可以单独控制它们的位置,例如安全存储,它由 -eclipse.keyring
命令行参数.
However, there are still things that have individual control over their location, such as secure storage, which is controlled by the -eclipse.keyring
command line argument.
地点
Eclipse 运行时定义了许多位置用于读取/存储数据和 Eclipse 用户的插件开发人员上下文对数据共享范围和可见性的控制.蚀定义了以下位置概念:
The Eclipse runtime defines a number of locations which give plug-in developers context for reading/storing data and Eclipse users a control over the scope of data sharing and visibility. Eclipse defines the following notions of location:
用户 (-user) {osgi.user.area} [@none, @noDefault, @user.home,@user.dir、文件路径、url]用户位置特定于,去图,用户.通常,用户位置基于 Java 的值user.home 系统属性,但这可以被覆盖.诸如此类的信息因为用户范围的首选项和登录信息可以在用户位置.
User (-user) {osgi.user.area} [@none, @noDefault, @user.home, @user.dir, filepath, url] User locations are specific to, go figure, users. Typically the user location is based on the value of the Java user.home system property but this can be overridden. Information such as user scoped preferences and login information may be found in the user location.
安装 (-install) {osgi.install.area} [@user.home,@user.dir、文件路径、url]安装位置是 Eclipse 本身的位置已安装.在实践中,这个位置是目录(通常eclipse"),它是正在运行的 eclipse.exe 的父级或plugins 目录包含 org.eclipse.equinox.launcher 包.这个位置对于普通用户来说应该是只读的install 可能被许多用户共享.可以设置安装定位并将 eclipse.exe 与 Eclipse 的其余部分解耦.
Install (-install) {osgi.install.area} [@user.home, @user.dir, filepath, url] An install location is where Eclipse itself is installed. In practice this location is the directory (typically "eclipse") which is the parent of the eclipse.exe being run or the plugins directory containing the org.eclipse.equinox.launcher bundle. This location should be considered read-only to normal users as an install may be shared by many users. It is possible to set the install location and decouple eclipse.exe from the rest of Eclipse.
配置(-configuration){osgi.configuration.area} [@none,@noDefault、@user.home、@user.dir、文件路径、url]配置位置包含识别和管理(子)集的文件安装运行.因此,每次安装可能有许多配置.安装可能带有默认配置区域,但通常启动场景涉及运行时试图找到更多可写配置位置.
Configuration (-configuration) {osgi.configuration.area} [@none, @noDefault, @user.home, @user.dir, filepath, url] Configuration locations contain files which identify and manage the (sub)set of an install to run. As such, there may be many configurations per install. Installs may come with a default configuration area but typical startup scenarios involve the runtime attempting to find a more writable configuration location.
实例(-data){osgi.instance.area}[@none, @noDefault, @user.home, @user.dir, 文件路径, url]实例位置包含用户定义的数据工件.例如,资源插件使用实例区域作为工作空间位置和因此是项目的默认主页.其他插件随意写他们喜欢这个位置的任何文件.
Instance (-data) {osgi.instance.area} [@none, @noDefault, @user.home, @user.dir, filepath, url] Instance locations contain user-defined data artifacts. For example, the Resources plug-in uses the instance area as the workspace location and thus the default home for projects. Other plugins are free to write whatever files they like in this location.
虽然用户可以设置任何这些位置,Eclipse 将计算合理的默认值,如果值没有给出.设置位置的最常见用例是实例区域,或者在 IDE 上下文中,工作区.运行您可以指定特定数据集上的默认 Eclipse 配置:
While users can set any of these locations, Eclipse will compute reasonable defaults if values are not given. The most common usecase for setting location is the instance area or, in the IDE context, the workspace. To run the default Eclipse configuration on a specific data set you can specify:
eclipse -data c:mydata
这篇关于在 Linux 中更改 .eclipse 文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Linux 中更改 .eclipse 文件夹
基础教程推荐
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 降序排序:Java Map 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01