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
After you add it to your code select the class, right-click on the application and choose “Locate Class Jar”.
The tool identifies the class you marked
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.
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.
Hi Oren,
that is an excellent blog thank you.
Very topical and useful.
All the best,
Andy.
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 🙂
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.