Obba Developer Documentation
Contents
Introduction
An application of Obba is to create new spreadsheet which use existing Java libraries. For this type of
"development process" the Obba Documentation of Spreadsheet Functions is the main reference.
This page focusses on more advanced development issues, e.g.
-
Java Development: Debugging your Java library called from a spreadsheet.
-
Redistribution: Building up an installer, installing Obba together with your own library and sheets on a clients system.
Debugging the Java Code Executed in the Obba Server
If you are developing a spreadsheet and a Java library simultaneously, it is most convenient to embed the Obba
server in your library and launch the Obba server directly from your IDE.
Integrating Obba Server in your Java Code
-
From the Obba distribution (Obba.zip) copy the jar's from the contents of the folder "Obba Server" to your project, that is
- Obba.jar - from the folder Obba/Obba Server
- Ice.jar - from the folder Obba/Obba Server/lib
- jgraphx.jar - from the folder Obba/Obba Server/lib
-
Add these jar's files to your project's classpath (Eclipse: Java build path).
-
Create a class which starts the server within your project, that is
Java
public class ServerLauncher {
public static void main(String[] args) {
info.obba.server.Server.main(args);
}
}
Debugging your Java Code
Once you have performed the step of integrating the code of Obba server into your project, you may start the server directly from your project. To debug your code, the following steps have to be performed:
-
Launch the Obba Server (e.g. by running the class ServerLauncher as Java Application) form your
IDE in debug mode.
-
Launch your Obba client spreadsheet.
That's all!
Notes:
-
It is important that the server is launched before the spreadsheet. The Obba client will discover the
Obba server launched from you IDE. This prevents the client from launching its own server.
-
If the server has started you will see "Obba server started." in the Java console. If you see an error it is most likely that another server is already running. Note also, that you have to terminate the server manually. It does not terminate if you close your spreadsheet application (objects persist in the server).
When launching the server from within the Java project, you do not need to load the Java classes of your project from the spreadsheet (they are already part of the server's classpath). If you distribute the sheet, you have to ensure that the library is loaded prior to all other calls to your library, e.g., by adding a call of obAddJar to your sheet.
Sample Project
The Obba Developers Resources contains a sample Eclipse project ObbaDebugTest. To debug
this project:
- Debug info.obba.server.Server from the IDE.
- Set a breakpoint in info.obba.custom.test.Incrementor.getNext(double value).
- Start the spread sheet Test Sheet.
Customizing Obba via Obba.properties file
The file Obba.properties can be used to customize Obba. Obba maintains its settings in this file. This file also contains the registration information (name and serial number). The location of the file depends on your configuration, see Section Configuration Files in "Documentation: Installation and Configuration".
You can set the following properties:
- userid
- The user id (part of the registration information).
- serial
- The serial number (part of the registration information).
- controlpanel
- If set to disallow access to the control panel is blocked.
- menu
- If set to hide the Obba menu for Excel is not shown.
Note that a registered version of Obba will not show a splash screen.
Installing a Serial Number
The registration information can be entered in the Obba control panel dialog "Registration...". In case you like to install a registered version you can do this by installing the appropriate Obba.properties file. The file is a standard Java properties files. The registration information is stored under the keys userid and serial.
If the file does not exist, Obba will create it. You may use this on your development system to create a template Obba.properties file.
Installing Obba Components together with Your Software
Obba for Excel
It is strongly recommended that you use the standard Obba installer (you can customize the installation as a second step).
If you have a developer license you may redistribute the installer bundled with you own application to be installed on a clients system. You may integrate the installer in your own installation process.
Silent Installation
By default the standard installer shows a gui and upon completion the user has to close the installer manually.
If you want to use the standard installer within a batch file (or you own installer) you can launch the Obba installer in silent mode using the command line option /S.
This following command will install Obba for Excel without showing up a gui and without user interaction:
"Install Obba for Excel.exe" /S
Installation Steps
The following describes the steps performed by the Obba installer for Excel. The description is only for reference. You do not need to perform these steps manually.
The installer performs the following steps:
- Install Obba.dll to %LOCALAPPDATA%\Obba\bin
- Install Obba.jar to %LOCALAPPDATA%\Obba
- Install Obba.properties to %LOCALAPPDATA%\Obba
- Install Obba.xla to %APPDATA%\Microsoft\Excel\XLStart
- Register Obba.dll with Windows. The installer makes registry entries under the following keys:
-
HKCU SOFTWARE\Obba
-
HKCU SOFTWARE\Classes\Obba.Functions
-
HKCU SOFTWARE\Classes\CLSID\{33904878-E284-37E8-82F3-0B482032FFC4}
These entries will tell Windows where Obba is installed. They will also tell Obba which Java runtime it should use.
- Install the Uninstaller in %LOCALAPPDATA%\Obba
Note: If you move the Obba folder %LOCALAPPDATA%\Obba then Obba cannot launch.
Obba for OpenOffice
Obba for OpenOffice is installed by opening Obba.oxt with OpenOffice. There is no specific installer.
Signing Obba (Obba.jar) with your own Certificate
Obba for Excel
Depending on the Windows setup user will have to accept a certificate prior first use of an Excel Sheet using Obba function.
By default, Obba uses a self signed certificate (publisher is Christian Fries). If you want to sign Obba with your certificate perform the following steps:
- Download the Obba Developers Resources. It contains an unsigned Obba.jar file.
- Sign the file Obba Developers/Unsigned JAR/Obba.jar with your certificate.
- Use this file in a customized installer (place the file in %LOCALAPPDATA%\Obba\lib after running the standard installer. For example, the custom installer example will perform this step if you placed you signed jar in Obba Developers\Obba for Excel - Custom Installer\InstallerFiles\lib (see Section "Creating a Custom Installer").
Note: Using an unsigned Obba.jar in Obba Excel may break functionality due to access violations. For example, a call to
obAddAllJars may generate an exception: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader).
Obba for OpenOffice
The jar files contained in Obba.oxt are signed (note: Obba.oxt is just a zip where the extension has been renamed from .zip to .oxt). You need to sign all the JAR files contained in this archive.