Skip to Content
Author's profile photo Former Member

NW 730 SP08 – Adding Class Jar Locator to NWDS

In NetWeaver 7.30, SAP introduced the Development Component (DC) concept. To develop a portal application in SAP NetWeaver Development Studio
you can switch to the Development Infrastructure perspective and develop a DC of type Portal Application Standalone. Using this perspective you can add
references to the public NetWeaver APIs (as appear in SAP javadocs) in a very simple way from the DC dependencies tab.

But what if you would like to develop your portal application in the old way and not as a development component? You still need to refer to the APIs, but where can you find them? Do you need to go to the installation DVD and extract the SCAs in order to find the jars containing the public classes?

Starting from 7.30 SP8 version of NWDS there is a more simple way of referencing these jars: Class Jar Locator

Suppose you want to refer to the class com.sapportals.portal.navigation.INavigationConstants

/wp-content/uploads/2012/11/img1_157979.png

After you add it to your code select the class, right-click on the application and choose “Locate Class Jar”.

/wp-content/uploads/2012/11/img2_157980.png

The tool identifies the class you marked

/wp-content/uploads/2012/11/img3_157981.png

Select the class you want. The Class Jar Locator displays the relevant jar com.sap.portal.navigation.api_service.public.jar (it is encapsulated in one of the many plug-ins that come with NWDS).

 

Select the jar you want to use (there can be more than a single option for it) and click Finish.

/wp-content/uploads/2012/11/img4_157982.png

It is added to your application .classpath file and is no longer appears as an error in Eclipse.

Please note that this reference is for build-time and you still need to add runtime dependencies to the portalapp.xml.

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Andy Silvey
      Andy Silvey

      Hi Oren,

      that is an excellent blog thank you.

      Very topical and useful.

      All the best,

      Andy.

      Author's profile photo Jan Penninkhof
      Jan Penninkhof

      Looks very familar. Always used the very similar "Class Locator", but I'm happy to see that such a feature is now part of the IDE 🙂

      Author's profile photo Tobias Hofmann
      Tobias Hofmann

      In NetWeaver 7.30, SAP introduced the Development Component (DC) concept

      Oh, and I thought that I am suffering from DCs since earlier releases.

      That said: may we hope that some day SAP Portal development will be developer friendly with a (public) maven repository that my Java dependency resolver can use to eliminate compile "challenges"? I've set up a Ivy rep for my development, makes it easier to use CI tools like Jenkins for the compile / depoy / test part of development.