Java Virtual Machine Launcher Error

    Joined
    Jun 30, 2013
    Messages
    72
    Reaction score
    0
    Whenever I try to start the game from the StarMade launcher I get the error:
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred Program will exit.

    Before you ask, yes I do have the latest version of java and no other versions of java are on my machine. I also tried upping the allowed memory usage to no avail.
     
    Joined
    Mar 20, 2014
    Messages
    36
    Reaction score
    6
    This sometimes happened to me when the memory values were custom values by myself, they >>HAVE<< to be a power of TWO (or the form of 2^x+2^y), so 1024, 2048, 4096, 5120, etc.. but, make a BAT file with the following contents, place it where the launcher is and try to run it:
    (this program assumes you have StarMade launcher installed into C:\Games\StarMade, and Java in C:\Program Files\Java, on 64 bit pc's you need to have 64 bit java)

    Code:
    cd \
    cd "C:\Games\StarMade\StarMade"
    "C:\Program Files\Java\jre7\bin\java.exe" -Xmn256M -Xms512M -Xmx2048M -Xincgc -jar C:\Games\StarMade\.\StarMade\StarMade.jar -force -port:4242
    Make sure to update the paths acordingly

    If this does not work I suggest you remove your settings which star-made saved, they are located in C:\Users\<your username>\AppData\Roaming\.StarMade\ folder, rename the folder or something (or just delete it if you don't care for your settings).

    Also, Why I made this batch file: Star-Made kept launching 32 bit java on my 64 bit laptop, so I had to FORCE 64 bit java to be used.
     
    • Like
    Reactions: caelum19
    Joined
    Jan 23, 2014
    Messages
    17
    Reaction score
    0
    Also, Why I made this batch file: Star-Made kept launching 32 bit java on my 64 bit laptop, so I had to FORCE 64 bit java to be used.
    Yep, if OP allocates more than 2048 MBs of ram, the virtual machine won't launch with 32 bit java.

    If OP is running a 64 bit machine, I suggest s/he just uninstalls 32 bit java and installs 64 bit java because some programs use the bad one by default


    OP if you have a 64 bit computer with more than 3GBs of RAM, go here https://www.java.com/en/download/manual.jsp and get the offline 64 bit for your OS(For windows, "Windows Offline (64-bit)")

    after that go to C:\Program Files (x86) and rename "Java" to "Bad java"
     
    Joined
    Jun 30, 2013
    Messages
    72
    Reaction score
    0
    That was it, Java had erroneously installed the 32-bit version instead of the 64-bit one. Now, to make another topic to see if I can't get sound working in StarMade.