如何为不同的eclipse实例分配不同的堆大小?
How to allocate different heap sizes to different eclipse instances?
在 eclipse 中我可以有多个 eclipse 实例,每个都指向不同的工作区。
我希望一个 eclipse 实例的 heap size
比另一个少,因为它处理的项目数量较少,而我 运行 中的东西需要较少的内存(这可能是出于任何原因)。
我可以使用
在 eclipse.ini
中设置堆大小
-Xms40m
-Xmx512m
选项。
但是,这会改变我启动的每个 eclipse 实例的堆大小。我不想要这个。
我想要不同的 eclipse 实例有不同的堆大小。我如何实现这一目标? (我估计工作区的 .metadata 文件夹里有东西)。
您可以在启动 eclipse 时指定要与 --launcher.ini command line option 一起使用的 ini 文件:
--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.exe
)以使用 eclipse 安装目录中名为 eclipse-min.ini
的文件(然后可以包含较小堆大小的配置)。
在 eclipse 中我可以有多个 eclipse 实例,每个都指向不同的工作区。
我希望一个 eclipse 实例的 heap size
比另一个少,因为它处理的项目数量较少,而我 运行 中的东西需要较少的内存(这可能是出于任何原因)。
我可以使用
eclipse.ini
中设置堆大小
-Xms40m
-Xmx512m
选项。
但是,这会改变我启动的每个 eclipse 实例的堆大小。我不想要这个。
我想要不同的 eclipse 实例有不同的堆大小。我如何实现这一目标? (我估计工作区的 .metadata 文件夹里有东西)。
您可以在启动 eclipse 时指定要与 --launcher.ini command line option 一起使用的 ini 文件:
--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.exe
)以使用 eclipse 安装目录中名为 eclipse-min.ini
的文件(然后可以包含较小堆大小的配置)。