cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot import com.sap.mw.jco

Former Member
0 Kudos

Hi,

I have an EJB project where I would like to make the JCO.Client connection. But here I cannot import com.sap.mw.jco or any other com.sap... package.

If it is a standalone java application(no J2EE), then I can acess the com.sap.mw.jco package.

How do i get around with this.

Regards

MK.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hello MK,

You need 2 type og references;

1) Build time reference. As described in previous post add jco library from <ROOT_NWDS_FOLDER>/SAP/JDT/eclipse/plugins/com.sap.mw.jco/lib/sapjco.jar

2) Runtime reference:

In your Enterprise application (deployable unit):

META-INF\application-j2ee-engine.xml:

<application-j2ee-engine>

...

<reference

reference-type="hard">

<reference-target

provider-name="sap.com"

target-type="library">com.sap.mw.jco</reference-target>

</reference>

...

</application-j2ee-engine>

Best regards, Maksim Rashchynski

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You should go in NWDS (or Eclipse) to your project properties and use the button 'ADD External Jars'. Then browse your local file system to locate the jar file containing the package com.sap.mw.jco.

Hope this will help you.

Regards,

Houcine bourquouquou