Skip to content

JVMArguments doesn't passed to launched app (javaExtras for JVMOptions is missing) #4

@radistao

Description

@radistao

I use these build settings for splash screen (see this JDK thread for details of the splash screen usage http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-November/005174.html):

macAppBundle {
    ....
    javaXProperties.add('dock:icon=Contents/Resources/${bundle.icon}')
    javaXProperties.add('ms64m')
    javaXProperties.add('mx1024m')

    javaProperties.put('com.apple.smallTabs', 'true')

    arguments.add("-splash:\$APP_ROOT/Contents/Java/${splashImageName}")

and it creates (as expected) the next Info.plist:

    <key>JVMOptions</key>
    <array>
      <string>-Dcom.apple.smallTabs=true</string>
      <string>-Xdock:icon=Contents/Resources/${bundle.icon}</string>
      <string>-Xms64m</string>
      <string>-Xmx1024m</string>
    </array>
    <key>JVMArguments</key>
    <array>
      <string>-splash:$APP_ROOT/Contents/Java/splash.png</string>
    </array>

but, the JVM argument is not used: when i run the app the splash screen is not shown. If i move <string>-splash:$APP_ROOT/Contents/Java/splash.png</string> from JVMArguments->JVMOptions (manually in Info.plist) - the application works as expected.

But, in the same time i can't put -splash property to this array using gradle config macAppBundle, because to JVMOptions section only -X and -D prefixed values are included (see

)

Could you add a possibility to add JVMOptions without -X or -D prefixes? Thanks

BTW, this property javaExtras existed in @crotwell version, but remove in you changes:
2bd66bf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions