Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increasing Heap size for SQuirreL SQL on Max OS X

I'm running SQuirreL SQL (2.6.8) on Max OS X.

I'm running out of heap space when trying to create a Table script.

How to configure SQuirreL SQL to start up with a higher JVM heap size?

like image 572
Erik Avatar asked Mar 30 '09 13:03

Erik


2 Answers

Assuming you have the SQuirreL in your Dock you can do following:

  1. Cmd-Click on the SQuirreL icon in the Dock, the Finder window will open showing the you the application.
  2. Left-Click on the SQuirreL Application and choose "Show package contents"
  3. Navigate into Contents folder and open Info.plist file
  4. Change or add following to your Info.plist file:
<key>Java</key>   
 <dict>
    <key>VMOptions</key> 
    <array> 
        <string>-Xms128m</string> 
        <string>-Xmx512m</string> 
    </array> 
</dict>

Here you get 128M at the start time with maximal SQuirreL.

Save the Info.plist file and restart the application.

like image 100
3 revs, 2 users 62%Slava Avatar answered Sep 21 '22 18:09

3 revs, 2 users 62%Slava


I'm running Linux, so you'll have to adapt this answer somewhat, but it should be applicable.

In the home directory that the installer jar creates, you'll find a file called "squirrel-sql.sh". The last line of this file is the java launch cmd. Not sure about the mac launch configuration, you might need to look for the file in this directory that contains this line. Mine reads

$JAVA -Xmx256m -cp $TMP_CP net.sourceforge.squirrel_sql.client.Main --log-config-file $SQUIRREL_SQL_HOME/log4j.properties --squirrel-home $SQUIRREL_SQL_HOME $1 $2 $3 $4 $5 $6 $7 $8 $9

The -Xmx256m configures the heap - it sets the max heap size to 256m. Just edit the file to read -Xmx512m or whatever. (for a list of the memory flags, type "java -X" at a command prompt).

like image 36
Steve B. Avatar answered Sep 21 '22 18:09

Steve B.