Semantic Layer SDK – check java bitness, path variable and connectivity property

There are three things that are important when you build a program that uses Semantic Layer SDK.

  • You need to include sl_sdk.jar to the class path.
  • You need to use 32 bit java
  • The system property businessobjects.connectivity.directory should be set to the connection server folder
    -Dbusinessobjects.connectivity.directory=”C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer”
  • The system variable PATH should be set to win32_x86
    C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86

It is quite easy to see if sl_sdk.jar is included, your program will fail quickly with NoClassDefFoundError. It might be not so obvious with the other three. The following code may help you to check them:

System.out.println("java = " + System.getProperty("java.version") + ", " 
  + System.getProperty("sun.arch.data.model") + " bit");
System.out.println("path = " + System.getenv("PATH"));
System.out.println("businessobjects.connectivity.directory = "
  + System.getProperty("businessobjects.connectivity.directory"));