Out of memory? How to allocate more RAM to Java

General minecraft related topics
mitte90
OP
Posts: 1200
Joined: Mon Sep 05, 2011 4:27 pm

Re: Out of memory? How to allocate more RAM to Java

Post by mitte90 »

the . is to set u in the active folder if u take it away the link are from the root... nothing? strange.. u are dubble clicking on the new file to start right?
mitte90
OP
Posts: 1200
Joined: Mon Sep 05, 2011 4:27 pm

Re: Out of memory? How to allocate more RAM to Java

Post by mitte90 »

sorry its "java -Xmx1024M -Xms512M -jar ./minecraft.jar"
User avatar
RevStoningpot
Moron
Posts: 2477
Joined: Sat Aug 13, 2011 12:39 pm
Location: first star to the right and straight on till morning
Contact:

Re: Out of memory? How to allocate more RAM to Java

Post by RevStoningpot »

with the quotes by the way?
mitte90
OP
Posts: 1200
Joined: Mon Sep 05, 2011 4:27 pm

Re: Out of memory? How to allocate more RAM to Java

Post by mitte90 »

no quotes
User avatar
RevStoningpot
Moron
Posts: 2477
Joined: Sat Aug 13, 2011 12:39 pm
Location: first star to the right and straight on till morning
Contact:

Re: Out of memory? How to allocate more RAM to Java

Post by RevStoningpot »

still nothing. Do i have the worst type of linux or what cuz i can never seem to do anything everyone else can do
User avatar
Gnatogryz
hated the previously assigned rank
Posts: 606
Joined: Tue Dec 27, 2011 4:36 pm
Location: Poland

Re: Out of memory? How to allocate more RAM to Java

Post by Gnatogryz »

Code: Select all

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JAVA_HOME/lib/amd64/:$JAVA_HOME/lib/i386/:$JAVA_HOME/jre/lib/amd64/:$JAVA_HOME/jre/lib/i386/" exec nice -n -4 java -Xmx1024M -Xms1024M -cp PATH_TO_MINECRAFT_LAUNCHER.jar net.minecraft.LauncherFrame $@
Try this, rev. Put it in a shell script and run.
User avatar
RevStoningpot
Moron
Posts: 2477
Joined: Sat Aug 13, 2011 12:39 pm
Location: first star to the right and straight on till morning
Contact:

Re: Out of memory? How to allocate more RAM to Java

Post by RevStoningpot »

nice: cannot set niceness: permission denied
Somthing like that it flashes real quick had to do it a lot to try and read it
User avatar
Gnatogryz
hated the previously assigned rank
Posts: 606
Joined: Tue Dec 27, 2011 4:36 pm
Location: Poland

Re: Out of memory? How to allocate more RAM to Java

Post by Gnatogryz »

Nice is a command that assigns process priority. But I guess Ubuntu is more strict about this command, so try it without nice:

Code: Select all

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JAVA_HOME/lib/amd64/:$JAVA_HOME/lib/i386/:$JAVA_HOME/jre/lib/amd64/:$JAVA_HOME/jre/lib/i386/" exec java -Xmx1024M -Xms1024M -cp PATH_TO_MINECRAFT_LAUNCHER.jar net.minecraft.LauncherFrame $@
User avatar
RevStoningpot
Moron
Posts: 2477
Joined: Sat Aug 13, 2011 12:39 pm
Location: first star to the right and straight on till morning
Contact:

Re: Out of memory? How to allocate more RAM to Java

Post by RevStoningpot »

this just closes the terminal without any message at all. Isn't there any way i can access the java options like the mac discription above? Ubuntu sure seems pretty impossible for doing anything. Does any one else use it? Do these ides work for other people? I just went out and bough some new ram going from 1G to 2G yet i'm stuck using 200M on minecraft. Not that it's ubuntu's fault i totaly put all the blame on mojang. I'd say blame java but it's mojang's dumbass' that decided to use java in the first place. I get the feeling this is hopeless
User avatar
RevStoningpot
Moron
Posts: 2477
Joined: Sat Aug 13, 2011 12:39 pm
Location: first star to the right and straight on till morning
Contact:

Re: Out of memory? How to allocate more RAM to Java

Post by RevStoningpot »

Finally got it. As the problem before was that it couldn't find jar file i just put it directly in the home folder and tried from there. So here's the final process i used to get it to work.
1. Put minecraft launcher (minecraft.jar) in the home folder
2. Make a text file that reads:

Code: Select all

java -Xmx1024M -Xms1024M -jar /home/stoningpot/minecraft.jar
of coarse stoningpot being your own user name
3. Set text file as executable in it's properties
4. Execute the text file. Does not need to be in same folder since i used the whole path

I just knew there had to be any easy fix to the can't find jar file problem
Post Reply