1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. While the majority of active discourse on D20PRO has moved to our Discord Channels, this forum is still active and checked-in on regularly by our staff. However, for the very latest information, conversation and/or immediate support, please join us on Discord here: http://discord.gg/Ph38ckM
    Dismiss Notice

JAVA Heap Size

Discussion in 'General Discussion' started by Gruntskokk, Feb 17, 2012.

  1. Gruntskokk

    Gruntskokk New Member

    Joined:
    Jan 25, 2011
    Messages:
    21
    Likes Received:
    0
    When attempting to import a large map with critters on it, I recieved a message telling me to close D20, increase the size of the Java Heap, and try it again.

    I am having a hard time finding such a setting. Errr... Am I sniffing glue?

    Thanks!
     
  2. thraxxis

    thraxxis Member

    Joined:
    Jul 8, 2008
    Messages:
    507
    Likes Received:
    1
    Hail Gruntskokk,

    What OS are you using? If Windows the easiest way is to run the installer again and choose 1024k for heap memory. If Mac, right-click and browse folder contents. Find the info.plist file and change 512 to 1024.
     
  3. Gruntskokk

    Gruntskokk New Member

    Joined:
    Jan 25, 2011
    Messages:
    21
    Likes Received:
    0
    That was the first thing I tried. Guess I should have said that. I'll just cut down the size of the map and give it another shot.

    Another question I have.

    I started a new campaign, and wanted to re-use all the maps i had created from the old campaign.

    I opened the old campaign, renamed all of the maps as I exported them, however, when I re-import them they retain the old name, and also nest themselves into the old subdirectories as opposed to the 'module' name I assign them as I import.

    Is there a better way to do a mass move of maps from one campaign to another? Or am I stuck with re-importing them as PNG's and creating each of the maps again?

    Thank you,

    GS
     
  4. edwardcd

    edwardcd Administrator
    Staff Member

    Joined:
    Oct 13, 2010
    Messages:
    1,374
    Likes Received:
    9
    1) You can increase the java RAM allocation beyond 1024 also. Java recommends using up to 1/4 (25% of your total RAM).
    Note: Maximum possible heap size on 32-bit Java = 1.8GB.

    You may edit your .BAT file (if using Windows):
    Code:
    start %JAVA% -Xmx1844m -Dsun.java2d.ddoffscreen=false -Dsun.java2d.noddraw -Dsun.java2d.d3d=false -jar d20Pro.dat
    Then run the BAT file to open d20Pro.

    You may edit your .PLIST (if using MacOS): Look for "VMOptions" in the Key column under "Java", then type the following in the "Value"
    Code:
    -Xmx1844m
    Note: d20Pro "Show Package Contents" > Contents > Info.plist

    Then, you may close out of the Plist editor, and the contents and open d20Pro normally.

    2) When you are saving maps, the larger the file size the longer d20Pro takes to import them into d20Pro's directory.
    Note: The uncompressed file size of the image is the amount of RAM that should be allocated to Java/d20Pro for the image to successfully import and load. This will also be the minimum requirement for your remote players to view the map.

    3) If you wish to use the same maps and creatures as another "Campaign", the best way would be to make a copy of the directory then rename the new directory.
    Note: campaign directories are located: \d20Pro\judge\campaigns OR d20Pro "Show Package Contents" > Contents > Resources > Java > judge > campaigns

    After you open d20Pro again, simply select the newly named Campaign and enjoy!
     

Share This Page