Java 如何在干净模式下运行eclipse?如果我们这样做会发生什么?
如果在我的Eclipse中有些东西不能正常工作,或者一些插件没有正确加载,我经常会收到以干净模式打开Eclipse的建议 那么,如何在清洁模式下运行呢?如果我这样做会发生什么?它的作用: 如果设置为“true”,则使用任何缓存数据 通过OSGi框架和eclipse 运行时将被清除。这将 清理用于存储捆绑包的缓存 依赖解析与eclipse 扩展注册表数据。用这个 选项将强制eclipse 重新初始化这些缓存 如何使用它:Java 如何在干净模式下运行eclipse?如果我们这样做会发生什么?,java,eclipse,Java,Eclipse,如果在我的Eclipse中有些东西不能正常工作,或者一些插件没有正确加载,我经常会收到以干净模式打开Eclipse的建议 那么,如何在清洁模式下运行呢?如果我这样做会发生什么?它的作用: 如果设置为“true”,则使用任何缓存数据 通过OSGi框架和eclipse 运行时将被清除。这将 清理用于存储捆绑包的缓存 依赖解析与eclipse 扩展注册表数据。用这个 选项将强制eclipse 重新初始化这些缓存 如何使用它: 编辑eclipse安装目录中的eclipse.ini文件,并插入-clea
- 编辑eclipse安装目录中的
文件,并插入eclipse.ini
作为第一行李>-clean
- 或者编辑用于启动Eclipse的快捷方式,并添加
作为第一个参数李>-clean
- 或者创建一个批处理或shell脚本,用
参数调用Eclipse可执行文件。此步骤的优点是,您可以保留脚本,并在每次希望清理工作区时使用它。您可以将其命名为-clean
(或eclipseclean.bat
)李>eclipseclean.sh
其他eclipse命令行选项:您可以从命令行以清除模式启动eclipse:
eclipse -clean
对于清洁模式:启动平台,如
eclipse -clean
就这些。该平台将清除一些缓存的OSGi捆绑包信息,如果您手动安装新插件或删除未使用的插件,则会有所帮助或推荐
它不会影响任何与工作区相关的数据。如其他答案所述,使用
-clean
选项是可行的
解决问题后,请确保将其从.ini
或快捷方式中删除。它会导致Eclipse在每次启动时重新评估所有插件,并会显著增加启动时间,具体取决于您安装了多少Eclipse插件。- 点击捷径
- 右键单击->属性
- 在target子句中添加-clean,然后开始
eclipse.lnk -clean
首先使用路径上的命令“dir”检查可执行文件的名称对于Mac OS X Yosemite,我可以使用open命令
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
-R, --reveal Selects in the Finder instead of opening.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
--args All remaining arguments are passed in argv to the application's main() function instead of opened.
-n, --new Open a new instance of the application even if one is already running.
-j, --hide Launches the app hidden.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
更简单的选择是
使用
/eclipse-clean
这将清除用于存储捆绑依赖项解析和eclipse扩展注册表数据的缓存。使用此选项将强制eclipse重新初始化这些缓存
以干净模式运行eclipse的两种方法 1)在Eclipse.ini文件中
- 打开eclipse安装目录中的eclipse.ini文件。
- 添加-清除文件中的第一行。
- 保存文件。
- 重新启动Eclipse
- 转到安装Eclipse的文件夹。
- 走日食之路
- C:..\eclipse\eclipse.exe-clean
- 按回车按钮
我建议(2),使用clean选项创建“第二个”eclipse快捷方式。您不希望它出现在eclipse.ini文件中,因为这样会禁用有用的OSGi缓存并增加eclipse启动时间。“只有当你觉得必须使用清洁剂时才使用清洁剂”。@Andreas_D,所以基本上你应该推荐(3)@SpaceRocker-我为什么要这样做?推荐你喜欢的。我一直建议使用“2”的变体,这是ubuntu中“EclipseClean”(当然是windows环境)的第二个快捷方式。在我的ini文件中,第一行是“-startup”,我想我需要删除它,以防我想在clean模式下运行它?(并替换为-clean)?我编辑了你的帖子,因为我错误地投了反对票,这是唯一可能增加你的帖子投票(删除一条空行)。抱歉,这是一个微不足道的更改,但是投票被锁定。我喜欢它不会改变工作区数据的信息!
open eclipse.app --args clean