GithubHelp home page GithubHelp logo

jvmArgs for dmg about gradle-macappbundle HOT 6 CLOSED

crotwell avatar crotwell commented on August 24, 2024
jvmArgs for dmg

from gradle-macappbundle.

Comments (6)

crotwell avatar crotwell commented on August 24, 2024

Not sure I understand, do you mean to hdiutil when it creates the dmg? If so, then no, it sizes the dmg to be big enough to hold the contents of the folder. If you want to add something to the dmg, it is better to add it to the app output dir (build/macApp by default) before the dmg is created.

from gradle-macappbundle.

knes1 avatar knes1 commented on August 24, 2024

I have the same question. Basically, if I were to run the jar file myself and wanted to have 512MB heap available to the app I would run it with:

java -Xmx512M -jar app.jar

So the question is, how to specify the -Xmx512M VM argument when the app is running from the bundle?

from gradle-macappbundle.

crotwell avatar crotwell commented on August 24, 2024

The was about the size of the dmg file, not about memory options.

But you can pass in the -Xmx using the javaExtras in macAppBundle like:
macAppBundle {
appName = "TestApp"
mainClassName = "gui.TestSketch"
bundleJRE = true
javaExtras.put('-Xmx512m', null)
}

from gradle-macappbundle.

knes1 avatar knes1 commented on August 24, 2024

Thanks for the info. Unfortunately this doesn't seem to work for maximum heap size argument, because it seems that this command will generate the following option -Xmx512m=null intead of -Xmx512m which then prevents JVM from running with the following error:

Invalid maximum heap size: -Xmx512=null
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

from gradle-macappbundle.

crotwell avatar crotwell commented on August 24, 2024

Which version of the plugin are you using? I just tested here using this:

macAppBundle {
    appName = "TestApp"
    mainClassName = "gui.TestSketch"
    bundleJRE = true
    javaExtras.put('-Xmx512m', null)
}

and got this in Info.plist:

    <key>JVMOptions</key>
    <array>
      <string>-Xmx512m</string>
    </array>

The =null was a bug in versions prior to 2.1.1, but was fixed here, over 2 years ago.
3a127f9

from gradle-macappbundle.

knes1 avatar knes1 commented on August 24, 2024

Ahhh - I'm sorry - you are correct! I picked up whatever Google link on mvnrepository.com offered as the latest version - which was 2.1.0. I didn't check correctly if there was a later version out.

Thank you for your help!

from gradle-macappbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.