MCP-Reborn icon indicating copy to clipboard operation
MCP-Reborn copied to clipboard

Invalid maximum heap size: -Xmx4G

Open KATu2011 opened this issue 2 years ago • 1 comments

At the decompile task, I alway get this error. You can reduce RAM usage when the decompile task is being started because I only have 2GB of RAM

Info: OS: Windows 10 1709 32-bit IDE: Intellij IDEA 2018.3.6 (i used this old version because the lastest intellij need 64-bit system) RAM: 2GB CPU: Intel(R) Celeron(R) N2840@ 2.16GHz

Here the log:

Task :mcp:setupMCP Setting up MCP environment Initializing steps Executing steps Running 'downloadManifest' Running 'downloadJson' Running 'downloadClient' Running 'downloadServer' Running 'stripClient' Running 'stripServer' Running 'merge' Running 'rename' Running 'mcinject' Running 'listLibraries' Running 'decompile' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Invalid maximum heap size: -Xmx4G The specified size exceeds the maximum representable size.

Task :mcp:setupMCP FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':mcp:setupMCP'.

Process 'command 'C:\Program Files\Java\jdk-1.8\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. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 19s 3 actionable tasks: 2 executed, 1 up-to-date

KATu2011 avatar Dec 25 '23 02:12 KATu2011

Use a newer JDK Version (Like JDK 17) if you are able to. I looked and saw that Adoptium has 32-bit versions up to Java 17. Maybe that will help. https://adoptium.net/temurin/releases/?os=windows&arch=x86&version=17&package=jdk (That should be the right version)

Tenneb22 avatar Feb 24 '24 16:02 Tenneb22