在Linux中更改.eclipse文件夹 [英] Change .eclipse folder in Linux

查看:456
本文介绍了在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中的其他地方,但仍然没有运气。

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. Please help me with this.

推荐答案

最简单的事情可能是传递java不同的用户。这样,所有其他无数的地方都可以从 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用户
a控制数据共享和可见性的范围。 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,filepath,url]

用户位置是特定于,go figure,
的用户。通常,用户位置是基于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,filepath,url] / strong>
安装位置是Eclipse本身
的安装位置。实际上,此位置是正在运行的eclipse.exe的父目录(通常为
eclipse),或包含org.eclipse.equinox.launcher包的
plugins目录。
这个位置应该被视为只读给普通用户,因为
安装可能被许多用户共享。可以设置安装
的位置,并从Eclipse的其余部分去除eclipse.exe。

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.

配置(配置){osgi.configuration .area} [@none,
@noDefault,@ user.home,@ user.dir,filepath,url]

配置
位置包含标识和管理( sub)一组
安装运行。因此,每次安装可能有很多配置。
安装可能带有默认配置区域,但典型的
启动方案涉及运行时尝试找到更多
可写配置位置。

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 ,filepath,url]

实例
位置包含用户定义的数据工件。例如,
Resources插件将实例区域用作工作区位置,
因此是项目的默认主页。其他插件可以自由地写入
,无论他们在这个位置的文件是什么。

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文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆