0

I'm using TextPad to run a simple Java program, and I keep getting an out of memory error.

Some digging on the internet tells me that I need to increase the heap size, and that the best way to do this seems to be with a flag. However, I can't find anything on how to implement flags in TextPad, or at least, any that seem to work for my program.

Here's the code I'm using:

import java.io.File;

import core.SaveData;
import core.obj.Player;
import core.files.PlayerFile;
import core.files.PlayerAttribute;



public class PositioningFix {

**Rest of the program**

Any help would be very much appreciated, even if it's just telling me to ditch TextPad and go with a different editor!

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197

2 Answers2

1

Thanks for the help guys, for anyone who stumbles across this, I needed to go into Configure > Preferences > Tools > Run Java Application, and enter "-Xmx1024m $BaseName" in the field labelled "Parameters". That gives a heap size of 1024mb, if I'd wanted 512mb, I would have had to type "-Xmx512m $BaseName"

0

At launch time need to allow more like: java -Xmx2048m PositioningFix will give you 2GB memory , heap.

  • and to add these parameters in textpad goto `Configure -> preferences -> tools -> Run Java Application` – Patrick Evans Oct 04 '13 at 22:21
  • Okay, so I get into there, and I have a couple of check boxes, and three fields; "Command", which is greyed out, "Parameters", and "Initial Folder", what do I do here? – user2848210 Oct 04 '13 at 22:39