How to create an executable jar file with 1 GB heap

后端 未结 3 1154
我寻月下人不归
我寻月下人不归 2021-01-23 08:14

I created a class that gives a text file containing system performance as output. I want to run it as an executable Jar. but when I run the Jar I want to increa

3条回答
  •  醉酒成梦
    2021-01-23 08:53

    As already mentioned: it unfortunately is not possible (without creating a wrapper, whether shortcut/script/executable ...).

    If you're only running on Windows, I can recommend Launch4J to create an executable wrapper that can apply these settings on execution:

    Wrapping it in a executable has other benefits:

    • If a suitable version of Java is not found, it will prompt the user to download it
    • Windows 7 Start Menu will treat it properly (highlighting it as a new application after installation)
    • Windows Firewall will treat it properly

提交回复
热议问题