Tags

, , ,

Prerequisites

– Timesten for mac is 32-bit only and it’ll only work if java is in 32-bit mode. We will use JDK 6.0 because as of the time of writing, JDK 7 in mac is not switchable to 32-bit mode.
– As of the time of writing, there’s no mac version of Timesten server for MAC so I used Timesten client 11g. You can grab it from TimesTen 11.2.1.9.0 client for Mac OS X Intel (32-bit)
– SQLDeveloper 3 for mac is already installed. I used SQLDeveloper 3.2.2 and you can grab it from SQL Developer 3.2.2 for Mac OS X. Not sure if previous versions would still work.

Let’s start

Set timesten environment variables

sh ${tt_installdir}/bin/ttenv.sh won’t do nothing to your environment variables but it’ll give a hint on what are the required environment variables for Timesten. We’ll just set those variables manually.

Eg.
If sh ${tt_installdir}/bin/ttenv.sh will produce

DYLD_LIBRARY_PATH set to {full shared library path}
PATH set to {full $PATH including your current $PATH}
CLASSPATH set to {timesten classpath}

Then edit your ~/.bash_profile and enter the following

export DYLD_LIBRARY_PATH={full shared library path}
export CLASSPATH={timesten classpath}

Since PATH above will output the full path including what’s in your current path, filter out the timesten path only and then create a variable and then prepend that to your current PATH.

export TIMESTEN_PATH={timesten path}
PATH=$TIMESTEN_PATH:/some/path:$JAVA_HOME/bin:$PATH

After setting the necessary variables. Execute

source ~/.bash_profile

Run SQLDeveloper using 32-bit java

1. Open SQLDeveloper.app/Contents/Resources/sqldeveloper/sqldeveloper/bin/sqldeveloper-Darwin.conf
2. Enter the following

SetSkipJ2SDKCheck true
SetJavaHome {PATH TO JAVA 6 HOME}
AddVMOption -d32 # Very important. Will switch java to 32-bit

Edit SQLDeveloper.app launcher script

For some reason SQLDeveloper will not read DYLD_LIBRARY_PATH variable defined in ~/.bash_profile above. Therefore we will just set it when SQLDeveloper.app is launched.

1. Make ~/Programs/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh writable by executing the command

chmod +w ~/Programs/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh

2. Open ~/Programs/SQLDeveloper.app/Contents/MacOS/sqldeveloper.sh. Below #!/bin/bash, add the line

export DYLD_LIBRARY_PATH="{full shared library path}"
Advertisements