Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8094725

Mac OS 10.9.3 Java FX launcher has a default value of 1024m

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 8u5
    • Fix Version/s: 8u40
    • Component/s: deploy
    • Labels:
    • Environment:

      JDK 8 Update 05, Mac OS 10.9.3

      Description


      When generating .app bundle using JavaFX ANT tools I noticed when I run my app that there's an -Xmx1024 added (I see that using jvisualvm) and I have no idea where this is coming from.
      My app ID is bloom
      In ~/Library/Preferences and /Library/Preferences, I don't have any bloom.plist file, I also checked any starting with ca.antaki*
      Here's fx:deploy params:
      <fx:deploy verbose="true" width="800" height="600" outdir="distfx" outfile="Bloom" nativeBundles="all"><!--all -->
      <fx:info title="Bloom" />
      <fx:application id="Bloom" toolkit="swing" name="Bloom" mainClass="ca.antaki.www.bloom.app.Bloom" />
      <fx:platform javafx="8.0+" ><!--basedir="" -->
      <fx:jvmuserarg name="-Xmx" value="512m" />
      <fx:jvmuserarg name="-Xms" value="512m" />
      <fx:jvmarg value="-Xmx2048m" />
      <fx:jvmarg value="-client" />
      <fx:jvmarg value="-Dfile.encoding=UTF-8"/>

      </fx:platform>
      <fx:resources>
      <fx:fileset dir="distfx" includes="*.jar" excludes="jfxrt.jar" />
      <fx:fileset dir="lib" includes="*.jar" excludes="jfxrt.jar" />
      </fx:resources>
      </fx:callbacks>
      </fx:deploy>

      This ANT generates the following plist:

      <?xml version="1.0" ?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
       <dict>
        <key>LSMinimumSystemVersion</key>
        <string>10.7.4</string>
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleAllowMixedLocalizations</key>
        <true/>
        <key>CFBundleExecutable</key>
        <string>Bloom</string>
        <key>CFBundleIconFile</key>
        <string>Bloom.icns</string>
        <key>CFBundleIdentifier</key>
        <string>bloom</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>Bloom</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>1.0.0</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
             for list of AppStore categories -->
        <key>LSApplicationCategoryType</key>
        <string>unknown</string>
        <key>CFBundleVersion</key>
        <string>100</string>
        <key>NSHumanReadableCopyright</key>
        <string>Unknown</string>
        <key>JVMRuntime</key>
        <string>jdk1.8.0_05.jdk</string>
        <key>JVMMainClassName</key>
        <string>ca.antaki.www.bloom.app.Bloom&lt;/string>
        <key>JVMAppClasspath</key>
        <string>EmailAddress.jar bcprov-jdk16-145.jar commons-codec-1.6.jar commons-httpclient-3.1.jar commons-lang-2.5.jar commons-logging-1.1.1.jar eventbus-1.4.jar glazedlists_java15-1.9.0.jar jai_imageio.jar jgoodies-binding-2.10.0.jar jgoodies-common-1.8.0.jar jgoodies-forms-1.8.0.jar jgoodies-validation-2.5.0.jar jhbasic.jar json_simple.jar log4j-1.2.17.jar metadata-extractor-2.6.4.jar restfb-1.6.11.jar scribe-1.3.5.jar slf4j-api-1.7.5.jar slf4j-simple-1.7.5.jar swingx-all-1.6.4.jar xmpcore.jar</string>
        <key>JVMMainJarName</key>
        <string>BloomFX.jar</string>
        <key>JVMPreferencesID</key>
        <string>bloom</string>
        <key>JVMOptions</key>
        <array>
          <string>-Xmx2048m</string>
          <string>-client</string>
          <string>-Dfile.encoding=UTF-8</string>
        </array>
        <key>JVMUserOptions</key>
          <dict>
            <key>-Xms</key>
            <string>512m</string>
            <key>-Xmx</key>
            <string>512m</string>
          </dict>
        <key>NSHighResolutionCapable</key>
        <string>true</string>
       </dict>
      </plist>


      When I run my app, I see the following in jvisualvm:
      -Djava.library.path=/Users/carl/Java/progs/Bloom/distfx/bundles/Bloom.app/Contents/Java
      -Djvm.preferences.id=bloom
      -Xmx2048m
      -Dfile.encoding=UTF-8
      -Xms512m
      -Xmx1024m

      Basically the Xmx2048m value that I provided is overwritten with Xmx1024m. If I try to put -Xms2048m the VM won't start.
      If I double click on my main executable JAR Xmx=1.8G

      When I run my app through eclipse and provide -Xmx2048m this work fine.

      I looked at the objective C launcher https://bitbucket.org/openjfxmirrors/openjfx-8-master-rt/src/b8d829dbef439f3ca2c307d6dbcced263e3f4193/deploy/packager/native/macosx/main.m?at=default but couldn't find anything useful.

      Can you please tell me why I'm getting -Xmx1024m or point me to the code responsible for that.
      Thanks for your help.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shemnon Danno Ferrin (Inactive)
                Reporter:
                cantakijfx Carl Antaki (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: