Java and SAP Business One SDK DI API Tutorial (Part Two)

In this part we will start a new Java project using NetBeans and add the necessary DI API libraries to the project.

Starting new NetBeans project

Open up your NetBeans IDE and go to File > New Project. From the list of available project templates, select Java Application.


Go ahead and give your project a name. Be sure to tick the box next to Create Main Class, this will save us some time by creating a simple main class as the starting point of the application.


After the wizard has finished setting up the project, you should have a .java file named after your project with starting point code, similar to the code below.

Before we start writing any more code, we need to add SAP Business One DI API libraries to our project. Go to File >Project Properties. In the Libraries section, click Add JAR/Folder button.


Navigate to C:\Program Files\SAP\SAP Business One DI API\JCO\LIB if you want to use 64-bit libraries or C:\Program Files (x86)\SAP\SAP Business One DI API\JCO\LIB for 32-bit libraries. Select both sboapi.jar and sbowrapper.jar files.


Both libraries should now be shown in the Compile-time Libraries section. Click OK to close Project Properties.


Go to Part Three

You may also like...

5 Responses

  1. Michel says:

    Hi, it is a nice article, congratulations.
    I would like to know if it is possible to use just the sboapi.jar and sbowrapper.jar files ? I am in a Linux environment so it will not be possible to install this api.

    • Rafał Adam Rozmus says:

      Hi Michael, thank you.
      Unfortunately, Java connector relies on native Windows libraries to work. It won’t be possible to use just those two Java files on Linux. If you’re building a solution that needs to run on Linux, the only option would be to use DI Server instead of DI API.

  2. Anup says:

    Hi , It is nice tutorial. I would like to know if you can post tutorial for JAVA and SAP DI Server.

    • Rafał Adam Rozmus says:

      Thank you. Maybe one day. I can’t promise anything as I have rather limited free time to do this 🙁

Leave a Reply

Your email address will not be published. Required fields are marked *