Solve OutOfMemoryError with Jedit on OS X

Sometimes I need my editor Jedit to open up files that are quite big. Usually this fails due to having not enough memory which is quit stupid considering my machine has 2GB of ram. I have opened files of 5MB on an old Amiga computer (with an extended ram of 16MB) without any hassles in the past. So not enough memory is ridiculous. Anyway, I sent a quick email to the Jedit mailinglist describing my problem and Eric Berry was kind enough help out. He explained that the plist I had for Jedit was not working correctly due to the VMOptions being outside the java dict, so that my set memory options were not working and Jedit was using the default memory size. The solution was making sure theVMOptions were within the java dict.

In my case I’m using a minimum of 96MB and a maximum of 1024MB as memory options. You need to add this to your plist within the Java dict tags:

<key>VMOptions</key>
<string>-Xms96m -Xmx1024m</string>

To make life even easier I have uploaded my plist, so you can just use it as an example. Download the Jedit plist.

ps: To check your own plist. Go to the folder in which you have installed the Jedit.app. Now right-click on Jedit.app and choose “Show Package Contents”. Now you will see the Contents of the Jedit.app and among others the Info.plist. This is a text file and can be viewed using any texteditor (like Jedit) or the propery editor although I have never bothered to use the latter….

Leave a Reply