cancel
Showing results for 
Search instead for 
Did you mean: 

Adding libraries to WD projects (WD for Java)

Former Member
0 Kudos

Hi,

How do you add your own jar files to a WD project? According to this help: http://help.sap.com/saphelp_nw04/helpdata/en/5b/a0480cb4a14747b60cf4d6b23c0a44/content.htm, the jars would sit in the WDA archive under PORTAL/libs. However, how do you get them there?

In NetWeaver Developer Studio, I have tried placing them in the lib folder under the root of the project, but they are no being included in my archive.

Thanks,

Martin

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Martin,

Put jar to lib folder under your WD project and it will be included to wda and ear files.

Or check Valery`s nice blog /people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro if you would like to make the library accessible among all components.

Best regards, Maksim Rashchynski.

Answers (2)

Answers (2)

Former Member
0 Kudos

Martin,

Copy the JAR files to the lib directory of your WD project, add them to the build path and build the project.(Right click the project --> properties --> java build path --> libraries tab --> add external jars).

However, if you want to add it to a DC then you may refer:

1.

~ Bala

Former Member
0 Kudos

Thanks for the replies.

Rajeev, I have in fact added it to the Java build path. The compiling is not the problem, but the inclusion into the wda in the ear.

Maksim and Bala, thanks for the reference to the Valery's blog. I was hoping not to have to go the route of deploying the library to the J2EE, but it seems this is the only option I have for now.

Thanks,

Martin

former_member182372
Active Contributor
0 Kudos

Hi Martin,

In case you are using WD project follow my first suggestion - Put jar to lib folder under your WD project and it will be included to wda and ear files.

In case you are using WD DC - library is the only case for external jars.

best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

As indicated in my original post, this is exactly what I did (put the jar in the lib folder in the root of the project), but still it is not included in the wda. (This is a normal WD project - not DC). So why does it work for you and not for me?

Thanks,

Martin

former_member182372
Active Contributor
0 Kudos

Hm, that`s strange. Try to remove all gen* folders and *.ear file from project root. Right click on project, select "reload" and "create archive" afterwards.

BTW, jar is included not to ear but to wda which is included to ear.

Former Member
0 Kudos

Hi,

Have you included this jars into java build path ->Libraries.

Regards,

Rajeev