Allow OpenOffice database connections via Java

Jun 13, '03 10:18:00AM

Contributed by: pjmurphy

OpenOffice.org has potentially some very useful database connection abilities. However, the Mac OS X final beta version 1.0.1 released for installation via the GUI installer cannot connect to MySQL (for example) via a Java driver (JDBC). The missing link is a file named 'javarc.' This functionality can be obtained by generating a javarc file and placing it in the /Applications -> OpenOffice.org1.01 -> user -> config directory. That is the default setup by the GUI installer, and if you have put OpenOffice.org elswhere, then look for that directory in your own installation.

To generate the javarc file, use this listing posted by sd on the OpenOffice Documentation Project forum site (using Pico or your favourite text editor to cut and paste from here):

 [Install] 
 ExcludeVersion=1.1.7b 1.1.7B 1.1.8 1.2.2 1.3.1 1.3.1_02 
 AdditionalClasspath= 
 VerifiedVersion=1.3.1 1.3.1_02
 RequiredVersion=1.3.1
 InstallationPath=. 
  
 [Java] 
 Home=/System/Library/Frameworks/JavaVM.framework/Home 
 VMType=jdk 
 Version=1.3.1
 RuntimeLib=/System/Library/Frameworks/JavaVM.framework/JavaVM 
 JavaLibPath=/System/Library/Frameworks/JavaVM.framework/Libraries 
 SystemClasspath=/usr/local/java 
 Java=1 
 JavaScript=1 
 Applets=1
You will note that the listing refers to Java 1.3.1. This will work as is. I do not know if changing it to Java 1.4.1 will work with OpenOffice.org1.0.1 - I suspect it will not (if 1.4.1 is installed on your machine, it exists side by side with 1.3.1 in Mac OS X and both are available). However, changing the reference in the javarc file to Java 1.4.1 works for me with OpenOffice.org1.0.3 - this latest version is available from trinity.neooffice.org.

OpenOffice.org help contains details as to setting up a database connection via JDBC.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030610234822788