How to increase java heap size programmatically

前端 未结 5 1737
抹茶落季
抹茶落季 2020-12-04 01:18

I have a java desktop application for searching files and it is usually reaching the default heap limit pretty soon. I wont have access to all the systems it will be install

5条回答
  •  一向
    一向 (楼主)
    2020-12-04 02:12

    There is no such standard API to do so.

    I would suggest you use Java Web Start to invoke your application (can be used for local applications to in the latest Sun Java 6) as it allows you to specify values for this.

    You can then have three or four links each pointing to exactly the same files but with "Tiny", "Medium", "Large", "Gigantic" heap sizes.

提交回复
热议问题