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!
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"
在启动时需要允许更多类似:java -Xmx2048m PositioningFix将为您提供2GB内存,堆。
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"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.