8 Troubleshooting
If you have to convert a large document, you could get the following error message :
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
In that case, you need to manually increase the memory available to the java virtual machine, for example using the following command to convert your document:
java -Xmx128M -jar writer2latex.jar bigFile.sxw out.tex
In the example, the heap size is set to 128 Megabyte of RAM. If you still get the “heap space” error, try setting the available memory to 256 or 512 Megabyte (assuming that your computer has enough physical RAM).
If you are using Writer2LaTeX as an export filter in LO, this problem will result in a generic error message saying that that document could not be written. To increase the heap size in this case, choose Tools – Options – LibreOffice - Advancde. Click Parameters, and add the parameter -Xmx128M (or higher).
A few memory optimizations are planned for the next version (1.4), which should make it possible to convert a wider range of documents without increasing the heap size in java.