Jump to content

Gradle Setup "Error occurred during initialization of VM Could not reserve enough space for 3145728KB object heap"


Recommended Posts

Posted

Howdy, I wanted to begin programming mods for Minecraft v. 1.12.2, so I downloaded the forge MDK and unzipped it in a new directory (of course)
I started following the README file with the instructions. Opened the cmd, pointed to the directory and launched the "gradlew setupDecompWorkspace" command, but I got the following message

:decompileMc
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap
:decompileMc FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':decompileMc'.
> Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_192\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 31.881 secs

while it was trying the :decompileMc command
 

Then I tried writing on the gradle.properties "org.gradle.jvmargs= -Xmx3G" so it could use more memory to build the task, but then...

To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14/userguide/gradle_daemon.html.

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap

 

I tried some other properties like "org.gradle.daemon=true" and "org.gradle.daemon.performance.enable-monitoring=false", when I tried to add memory it shows the second message while when I tried to reduce the memory it shows the first one... I don't know if there are some java configurations I have to do or what, so can anyone help me with this?

 

 

Posted

Could you open a command prompt and show me the output of java -version as well as javac -version?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted
  On 11/16/2018 at 7:06 PM, DaemonUmbra said:

Could you open a command prompt and show me the output of java -version as well as javac -version?

Expand  

Sure

c:\Program Files (x86)\Java\jdk1.8.0_192\bin>java -version
java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) Client VM (build 25.192-b12, mixed mode)

c:\Program Files (x86)\Java\jdk1.8.0_192\bin>javac -version
javac 1.8.0_192

c:\Program Files (x86)\Java\jdk1.8.0_192\bin>

 

I also tried to use the commands outside the directory and only java -version worked (even though I setted the path, idk if it's normal or not)

Posted

What does it say when you run gradlew setupDecompWorkspace --stacktrace?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted (edited)
  On 11/16/2018 at 8:45 PM, DaemonUmbra said:

What does it say when you run gradlew setupDecompWorkspace --stacktrace?

Expand  

Here it is

C:\Users\Kitzu\Documents\MC_Mods\Test>gradlew setupDecompWorkspace --stacktrace
Starting a new Gradle Daemon for this build (subsequent builds will be faster).

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap


* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.GradleException: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap

        at org.gradle.launcher.daemon.bootstrap.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:34)
        at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:153)
        at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:136)
        at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:111)
        at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:89)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:122)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:80)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)


C:\Users\Kitzu\Documents\MC_Mods\Test>

 

and gradle.properties had jvmargs= -Xmx3G

Edited by Kitsu
Posted

How much ram is physically in your machine?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

 

It looks like you're using a 32-bit version of Java here: c:\Program Files (x86)\Java\jdk1.8.0_192
 

Use the 64-bit version instead - as your PC has >4GB ram, this should be supported.

Posted
  On 11/17/2018 at 2:27 PM, quadraxis said:

 

It looks like you're using a 32-bit version of Java here: c:\Program Files (x86)\Java\jdk1.8.0_192
 

Use the 64-bit version instead - as your PC has >4GB ram, this should be supported.

Expand  

wops I thought I already had installed the x64 version, my bad, now it seems to work just fine thanks a lot ^^

  • 8 months later...
Posted

Please don't Necro old threads, if you have an issue make your own.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.