cancel
Showing results for 
Search instead for 
Did you mean: 

Using External JAR file within Web Dynpro DC

Former Member
0 Kudos

Hi,

I have created a Web Dynpro DC and I need to use an external JAR file.

I want to use this external JAR file within the same Web Dynpro DC and NOT creating another DC to house the external JAR file as I can see from the blog.

I have included the external JAR file in the "lib" folder of the Web Dynpro DC.

When I tried to perform a DC build, it keeps complaining error....

How should I solve this problem...

Thanks.

mike

Accepted Solutions (0)

Answers (5)

Answers (5)

snehal_kendre
Active Contributor
0 Kudos

Hi Mike,

You cant just add any external jar file into a DC project.

There is only one way to add a external jar file is by using external library project.

1.create an external library project type DC.

2. put your external jar file into its lib folder.

3. create its public part of type SDA...and API.

4. just use SDA public part into your webdynpro project as used DC.

4. and when you deploy your webdynpro project on server, this file will also get deployed... remember to use SDA public part..

Former Member
0 Kudos

Hi,

It is some BI Connection jar file that I have been given.

This is using the BI Java Connector to connect to the BW system. The jar file was left over by a previous developer.

I do not want to create another external library DC to house this jar file. I just want to use this jar file within my Web Dynpro DC...Is this possible?

I tried to add this jar file using Java Build Path but the classpath does not gets updated when I performed a DC build.

In addition, if I activate this Web Dynpro DC via NWDI, does the jar file gets deployed too?

any assistance is greatly appreciated.

Former Member
0 Kudos

Hi,

Just try this if it works:

1. Open your navigator view and add open properties for .classpath files. Uncheck the readonly attribute for your file and say OK.

2. Now try adding the jar file in your buildpath.

Regards,

Murtuza

Former Member
0 Kudos

Hi Mike,

A better approach to use external jar files in a DC development is to use external library type DC.

For step -by - step procedure you can refer to this [blog|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2361] [original link is broken] [original link is broken] [original link is broken];.

Regards,

Alka.

Former Member
0 Kudos

Hi Mike,

You can put the .jar file in the JavaBuildPath, ie., right click on your DC->Properties->JavaBuildPath(Libraries Tab)->Add External Jars->Select the Jar file which you want to add->click on OK.

Thanks n Regards,

Jhansi Miryala

Former Member
0 Kudos

Hi,

The Web Dynpro DC is in the DTR and I put the .jar file in the JavaBuildPath and did as you say. The classpath is updated with the new entry to the external .jar file.

But when I perform a DC build, the error appears again and the new entry in the classpath is lost....

So how do you include a external JAR file in the same Web Dynpro DC project and when it is deployed via NWDI, the jar file is also deployed too.

Please note that I do NOT want to create another DC to house the external JAR file and then add this DC into the Used DC of the Web Dynpro.

Former Member
0 Kudos

Hi Mike,

Go through the below which might help you.

http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm

Thanks n Regards,

Jhansi Miryala

Former Member
0 Kudos

Hi Mike,

Which is the jar file that you want to add?

Regards,

Murtuza

former_member201361
Active Contributor
0 Kudos

Hi,

put the jar file to the Java Build path of the Project.

Thanks and Regards

Fazal B