7 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 OOo, 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 – OpenOffice.org – Java. Click Parameters, and add the parameter -Xmx128M (or higher).
A few memory optimizations are planned for the next version (1.2), which should make it possible to convert a wider range of documents without increasing the heap size in java.