在 Eclipse 中,我可以有多个 Eclipse 实例,每个实例都指向不同的工作区。
我希望一个 Eclipse 实例的堆大小
小于另一个,因为它处理的项目数量较少,而且我在其中运行的内容需要较少的内存(这可能是出于任何原因)。< br/>
我可以使用
-Xms40m
-Xmx512m
选项。
但是,这会更改我启动的每个 Eclipse 实例的堆大小。我不想要这个。
我想要不同的 Eclipse 实例具有不同的堆大小。我该如何实现这一目标? (我认为工作区的 .metadata 文件夹中有一些东西)。
最佳答案
您可以指定要与--launcher.ini command line option一起使用的ini文件。启动 Eclipse 时:
--launcher.ini <location> (Executable)
the location of the product .ini file to use. If not specified the executable will look for a file beside the launcher with the same name and the extension .ini. (ie eclipse.exe looks for eclipse.ini, product.exe looks for product.ini)
您可以创建不同的快捷方式或不同的 .exe
文件,例如对于 Windows,请使用 path/to/eclipse.exe --launcher.ini eclipse-min.ini
(或将默认的 eclipse.exe
复制到 eclipse-min.ini)。 exe
)以使用 Eclipse 安装目录中名为 eclipse-min.ini
的文件(该文件可以包含较小堆大小的配置)。
关于java - 如何为不同的eclipse实例分配不同的堆大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31408248/