As you can notice, the Java import statements are missing along with request expected form data.

Step 2: Get Your API key

When using any of the APIs outside of the SAP API Business Hub, an application key will be needed in every request header of your APIs calls.

To get to your API key, click on the icon in the top right corner of the page. Click on the key icon.

The following pop-up should appear. Click on the Copy API Key button and save it in a text editor.

Step 3: Start the Eclipse IDE

Now, let’s start the Eclipse IDE and select your workspace (either the default, a new or an existing one).

If you don’t have the Eclipse IDE installed, you can download the latest version from the following link: Eclipse Downloads

You can pick either the Eclipse IDE for Java EE Developers or the Eclipse IDE for Java Developers.

By default the Java perspective should be Launched. If not, use the menu bar and select Window > Perspective > Open Perspective > Java.If the Java perspective is not listed, then use the Other… o open it.

You can also close the Welcome Page.

Step 4: Create a New Project in the Eclipse IDE

Using the menu bar, go to File > New > Java Project.

You can name your project the way you want, here we will call it ml-imageclassification.

Click on Finish.

Note: make sure you pick JavaSE-1.8 as your project Execution Runtime JRE. This should help avoid coding compliance and runtime issues with the provided code.

Step 5: Create a New Java Class

Using the menu bar, go to File > New > Class.

Make sure that your source folder is ml-imageclassification/src.

You can name your Java class the way you want, here we will call it DemoImageClassification and put it in a demo package.

Check the public static void main(String[] arg) box in order to get the main function created.

Click on Finish.

The default code in your newly created class should be something this: