GoldenDelicios / Lite2Edit

Java application: Converts Litematics to WorldEdit schematics
MIT License
126 stars 12 forks source link

Help please? #15

Open justmqrko opened 1 month ago

justmqrko commented 1 month ago

I was trying to convert a big map. The file is about 1.2mb in size.

I got this error: Error while converting Boat Race.litematic: java.lang.OutOfMemoryError: Java heap space

Here is the log: java.lang.OutOfMemoryError: Java heap space at java.nio.file.Files.read(Unknown Source) at java.nio.file.Files.readAllBytes(Unknown Source) at goldendelicios.lite2edit.Converter.litematicToWorldEdit(Converter.java:109) at goldendelicios.lite2edit.Lite2Edit.lambda$1(Lite2Edit.java:105) at goldendelicios.lite2edit.Lite2Edit$$Lambda$21/0x16386510.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) java.lang.OutOfMemoryError: Java heap space at java.nio.file.Files.read(Unknown Source) at java.nio.file.Files.readAllBytes(Unknown Source) at goldendelicios.lite2edit.Converter.litematicToWorldEdit(Converter.java:109) at goldendelicios.lite2edit.Lite2Edit.lambda$1(Lite2Edit.java:105) at goldendelicios.lite2edit.Lite2Edit$$Lambda$21/0x16386510.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

Can someone help?

GoldenDelicios commented 1 month ago

You can try running this in a command prompt/terminal window: java -jar -Xmx4G path/to/Lite2Edit.jar This will launch Lite2Edit with up to 4GB of RAM. You can increase this if needed.