VlkOfficial Posted March 25, 2018 Posted March 25, 2018 (edited) Hello, i have got a problem with my servers. When i started the server with more than 1G it don´t worked but if i started it with lower it worked: java -Xms2G -Xmx2G -jar forge-1.12.2-14.23.2.2632-universal.jar nogui pause It crashed every time and wrote to me this: java -Xms2G -Xmx2G -jar forge-1.12.2-14.23.2.2632-universal.jar noguiError occurred during initialization of VMCould not reserve enough space for 2097152KB object heap But i have free enough RAM for this so i tried to fix it and at this page and i found some answers: https://bukkit.org/threads/complex-craftbukkit-server-and-java-problem-could-not-reserve-enough-space-for-object-heap.155192/ But it still don´t work and now it wrote to me this: After trying to fix it by changing "(automatically) poorly set environment variable" A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:62) at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31) Caused by: java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) ... 6 more I will be so much happy if will someone help me with this, because I have every time started servers with only 1G and now 1G don´t works too. Edited March 25, 2018 by VlkOfficial Quote
VlkOfficial Posted March 26, 2018 Author Posted March 26, 2018 My Java version is Java8u161 isn´t it good? Quote
Ugdhar Posted March 26, 2018 Posted March 26, 2018 Please post the output of java -version from your commandline, it will show the version of java that is being used by default/in the path. It may be that you have Java 8 and 9 installed, but 9 is the one on your path. Quote
VlkOfficial Posted March 28, 2018 Author Posted March 28, 2018 On 26. 3. 2018 at 4:01 PM, diesieben07 said: You are not using Java 8 to launch the server. So, how can i launch server with Java 8. Quote
VlkOfficial Posted March 28, 2018 Author Posted March 28, 2018 On 26. 3. 2018 at 3:59 PM, Ugdhar said: Please post the output of java -version from your commandline, it will show the version of java that is being used by default/in the path. It may be that you have Java 8 and 9 installed, but 9 is the one on your path. When i did what you said it wrote this: java -version java version "10" 2018-03-20 Java(TM) SE Runtime Environment 18.3 (build 10+46) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode) Quote
VlkOfficial Posted March 29, 2018 Author Posted March 29, 2018 1 hour ago, diesieben07 said: You have Java 10 installed. So what can i do with it? Quote
LexManos Posted March 29, 2018 Posted March 29, 2018 You can always run a specific version of java by using the full path to the java executable. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
VlkOfficial Posted March 30, 2018 Author Posted March 30, 2018 After reinstalling Java it wrote after starting server this: Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap But i know that i have enough free space. So after that i checked again cmd it wrote this: java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) Client VM (build 25.161-b12, mixed mode) Quote
LexManos Posted March 30, 2018 Posted March 30, 2018 Well ya.. I highly doubt your computer has 2TB of ram to dedicate to the server... you seem to of messed up how you're setting the needed ram. Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
VlkOfficial Posted April 2, 2018 Author Posted April 2, 2018 I don´t know if I understood but if yes that u told me that I have to buy more RAM? Quote
Ruukas Posted April 2, 2018 Posted April 2, 2018 He means this : "Could not reserve enough space for 2097152KB", which is roughly 2tb. Are you sure you are using the correct launch arguments? Check the contents of your "run.bat" or whatever you use. Try this instead: -Xms256m -Xmx2048m Quote
Ugdhar Posted April 2, 2018 Posted April 2, 2018 1 hour ago, Ruukas said: Could not reserve enough space for 2097152KB", which is roughly 2tb. 2097152KB / 1024 = 2048MB / 1024 = 2GB There is no mention of 2TB anywhere in the errors. . . 1 Quote
Ruukas Posted April 2, 2018 Posted April 2, 2018 Haha, you are right. At first I got it to 2gb too, but then somehow I managed to get it to 2tb, after calculating a couple of times. I guess I kind of forced it. Quote
VlkOfficial Posted April 2, 2018 Author Posted April 2, 2018 5 hours ago, Ruukas said: He means this : "Could not reserve enough space for 2097152KB", which is roughly 2tb. Are you sure you are using the correct launch arguments? Check the contents of your "run.bat" or whatever you use. Try this instead: -Xms256m -Xmx2048m I did what you said but it wrote again: Could not reserve enough space for 2097152KB I rlly don´t know what can i do with it... Quote
VlkOfficial Posted April 2, 2018 Author Posted April 2, 2018 Can u please send me link for Java that i need? Quote
VlkOfficial Posted April 2, 2018 Author Posted April 2, 2018 (edited) 30 minutes ago, diesieben07 said: https://www.java.com/en/download/manual.jsp OK, after I downloaded this new Java offline (64) because Java online downloaded to Frogram Files x86 and how did I got know there are Java versions 32-bit. I checked server, cmd and where is Java downloaded. Now Java is in C:\Program Files\Java\jre1.8.0_161 cmd was: java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode) And server after starting with: java -Xms256m -Xmx2048m -jar forge-1.12.2-14.23.2.2632-universal.jar nogui pause WORKS!!! Thank you all so much, now i know that it was only because I am idiot and I had problem that I can fix too. Edited April 2, 2018 by VlkOfficial Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.