Importing and Referencing the API Library 
This procedure differs depending on whether you are using the NetWeaver Development Infrastructure (NWDI).
If you are using NWDI, import the library from the System Landscape Directory (SLD) into the development configuration. For detailed instructions, see Importing Development Configurations at http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c3/e3a43f4aa1330ee10000000a114084/frameset.htm.
If you are not using NWDI, deploy the library locally and set 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 where you 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.
Note
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>