This procedure differs depending on whether or not you are using the SAP NetWeaver Development Infrastructure (NWDI).
If you are using NWDI, import the library from the System Landscape Directory (SLD) into the development configuration.
If you are not using NWDI, deploy the library locally and set the references as follows:
Extract the JAR files from the SPACES-API.SCA file to a local folder of your choice.
In the Preferences dialog of NWDS, choose and create a new variable with the path set to the folder in which you have saved the JAR files.
In the Properties dialog of your Java project, choose , select the tc~workspaces~api_api.jar file that contains the API, choose Add External JAR, and then OK.
Regardless of the way you have deployed the library, you need to add a private sharing reference to tc~workspaces~api in your project's portalapp.xml:
<application-config>
<property name="PrivateSharingReference" value="tc~workspaces~api" />
</application-config>