Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在干净模式下运行eclipse?如果我们这样做会发生什么?_Java_Eclipse - Fatal编程技术网

Java 如何在干净模式下运行eclipse?如果我们这样做会发生什么?

Java 如何在干净模式下运行eclipse?如果我们这样做会发生什么?,java,eclipse,Java,Eclipse,如果在我的Eclipse中有些东西不能正常工作,或者一些插件没有正确加载,我经常会收到以干净模式打开Eclipse的建议 那么,如何在清洁模式下运行呢?如果我这样做会发生什么?它的作用: 如果设置为“true”,则使用任何缓存数据 通过OSGi框架和eclipse 运行时将被清除。这将 清理用于存储捆绑包的缓存 依赖解析与eclipse 扩展注册表数据。用这个 选项将强制eclipse 重新初始化这些缓存 如何使用它: 编辑eclipse安装目录中的eclipse.ini文件,并插入-clea

如果在我的Eclipse中有些东西不能正常工作,或者一些插件没有正确加载,我经常会收到以干净模式打开Eclipse的建议

那么,如何在清洁模式下运行呢?如果我这样做会发生什么?

它的作用:

如果设置为“true”,则使用任何缓存数据 通过OSGi框架和eclipse 运行时将被清除。这将 清理用于存储捆绑包的缓存 依赖解析与eclipse 扩展注册表数据。用这个 选项将强制eclipse 重新初始化这些缓存

如何使用它:

  • 编辑eclipse安装目录中的
    eclipse.ini
    文件,并插入
    -clean
    作为第一行
  • 或者编辑用于启动Eclipse的快捷方式,并添加
    -clean
    作为第一个参数
  • 或者创建一个批处理或shell脚本,用
    -clean
    参数调用Eclipse可执行文件。此步骤的优点是,您可以保留脚本,并在每次希望清理工作区时使用它。您可以将其命名为
    eclipseclean.bat
    (或
    eclipseclean.sh
(发件人:)


其他eclipse命令行选项:

您可以从命令行以清除模式启动eclipse:

eclipse -clean

对于清洁模式:启动平台,如

eclipse -clean
就这些。该平台将清除一些缓存的OSGi捆绑包信息,如果您手动安装新插件或删除未使用的插件,则会有所帮助或推荐


它不会影响任何与工作区相关的数据。

如其他答案所述,使用
-clean
选项是可行的

解决问题后,请确保将其从
.ini
或快捷方式中删除。它会导致Eclipse在每次启动时重新评估所有插件,并会显著增加启动时间,具体取决于您安装了多少Eclipse插件。

  • 点击捷径
  • 右键单击->属性
  • 在target子句中添加-clean,然后开始
这将需要很长时间才能正常启动,并将刷新所有资源。

对于Windows用户: 您可以按照RTA所述或通过命令行执行以下操作: 导航到eclipse可执行文件的位置,然后运行:

 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重新初始化这些缓存

  • 打开命令提示符(cmd)
  • 转到eclipse应用程序位置(D:\eclipse)
  • 运行命令eclipse-clean

  • 以干净模式运行eclipse的两种方法

    1)在Eclipse.ini文件中

    • 打开eclipse安装目录中的eclipse.ini文件。
    • 添加-清除文件中的第一行。
    • 保存文件。
    • 重新启动Eclipse

    2)从命令提示符(cmd/Command)

    • 转到安装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