Compile the java samples
===========================

A GNU make version 1.79.1 or later is required in order to build the examples. GNU make
is available from

http://www.gnu.org,

it can be ftped via 

ftp://ftp.gnu.org/gnu/make


Make sure, the gnu-make-executable and java is included in your PATH variable. Switch
to e.g. the CalcAddins subdirectory and type make. You will then get help what to do to
build the examples on your platform.

NOTE : If you don't want to use GNU make, you can compile by hand using javac.
Simply make sure, that all jar files, that can be found in the classes directory of
this development kit are within your CLASSPATH.

_______________________________________________________________________________________


In order to register your jar file you could use a StarBasic macro. You only
have to create a new macro (menu Extras/Macro) and copy the following StarBasic
script into this macro. Furthermore, you should replace the existing path of 
the jar file with the path of your jar file. Finally you should excecute 
the new macro. 
After a restart of your Office your Calc should provide all new functions.

REM  *****  BASIC  *****
sub registerCalcAddin
  REM get the Java loader
  createUnoService("com.sun.star.loader.Java2")

  REM get the implementation registration, use this command only the first time
  regImpl = createUnoService("com.sun.star.registry.ImplementationRegistration")

  REM register the instance inspector, you should customize the directory of the jar file, use this command only the first time
  regImpl.registerImplementation("com.sun.star.loader.Java2", "file:///e:/Trash/CalcAddins/CalcAddins.jar", null)
  
  REM create a new Instance Inspector
  objectCalcAddin = createUnoService("com.sun.star.sheet.addin.CalcAddins")
  
  REM show all supported interfaces
  msgbox( objectCalcAddin.dbg_supportedInterfaces )
  
  REM show all methods
  msgbox( objectCalcAddin.dbg_methods )
  
  REM revoke the jar file
  'regImpl.revokeImplementation("file:///e:/Trash/CalcAddins/CalcAddins.jar", null)
end sub
