【发布时间】:2011-01-03 01:22:14
【问题描述】:
如果我的 Eclipse 中某些东西不能正常工作或某些插件没有正确加载,我经常会收到建议以干净模式打开 Eclipse。
那么,如何在干净模式下运行呢?如果我这样做会怎样?
【问题讨论】:
如果我的 Eclipse 中某些东西不能正常工作或某些插件没有正确加载,我经常会收到建议以干净模式打开 Eclipse。
那么,如何在干净模式下运行呢?如果我这样做会怎样?
【问题讨论】:
这将清除用于存储包依赖解析和 Eclipse 扩展注册表数据的 缓存。使用此选项将强制 eclipse重新初始化这些缓存。
eclipse -clean
【讨论】:
正如其他答案所述,使用 -clean 选项是可行的方法。
确保在解决问题后将其从.ini 或快捷方式中删除。它会导致 Eclipse 在每次启动时重新评估所有插件,并且会显着增加启动时间,具体取决于您安装了多少 Eclipse 插件。
【讨论】:
更简单的选择是
使用./eclipse -clean
【讨论】:
它的作用:
如果设置为“true”,则使用任何缓存数据 通过 OSGi 框架和 eclipse 运行时将被清除干净。这会 清理用于存储包的缓存 依赖解析和eclipse 扩展注册表数据。使用这个 选项将强制日食 重新初始化这些缓存。
使用方法:
eclipse.ini 文件并插入 -clean 作为第一行。 -clean 作为第一个参数。 -clean 参数调用 Eclipse 可执行文件。此步骤的优点是您可以保留脚本并在每次要清理工作区时使用它。您可以将其命名为 eclipse-clean.bat(或 eclipse-clean.sh)。 (来自:http://www.eclipsezone.com/eclipse/forums/t61566.html)
其他 eclipse 命令行选项:http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html
【讨论】:
对于 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.
这对我有用:
open eclipse.app --args clean
【讨论】:
对于 Windows 用户: 您可以按照 RTA 所说的或通过命令行执行以下操作: 导航到 eclipse 可执行文件的位置,然后运行:
eclipse.lnk -clean
首先使用路径上的命令“dir”检查可执行文件的名称
【讨论】:
正常启动需要很长时间,并且会刷新所有资源。
【讨论】:
对于清洁模式:启动平台喜欢
eclipse -clean
就是这样。该平台会清除一些缓存的 OSGi 包信息,如果您手动安装新插件或删除未使用的插件,它会有所帮助或建议使用。
它不会影响任何工作区相关的数据。
【讨论】:
您可以从命令行以干净模式启动 Eclipse:
eclipse -clean
【讨论】: