Skip to Content
avatar image
Former Member

Using External Library in Mobile Web Dynpro Offline

Hi all,

i would like to use a jar in a Mobile Application for Handheld and i followed the steps from the wiki "Using External Library in Mobile Web Dynpro Offline" at

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/usingExternalLibraryinMobileWebDynpro+Offline

>How to use External Library in Mobile Web Dynpro Offline

>For using external jar in local deployment scenario, one can do following:

>1. In the dc where jar has to be used, add the jar as external jar classpath entry. It can be done via <dc> > (Right-click)> properties->Java Build Path->Select "add external jar".

>2. Do the programming using the jar.

>3. Shut down the mobile client.

>4. Copy the jar in the "lib" folder of mobile client installation.

>5. Deploy the application in the IDE.

>6. Run the application.

>In 5, the jar will not deployed and will be picked from the lib folder during 6.

>...

>Note: This will work on and after SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 (and after).

i get a error at the deployment with the message "...package myres does not exist...":

>echo: C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment 4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_oca

>echo: class path: C:Program FilesSAPIDECEeclipsepluginscom.sap.tc.ap_2.0.1.080222142948compXOCADCssap.com cmobileocaapi\_compgendefaultpublicapilibjavasap.comtcmobileocaapi~api.jar

>echo: output dir: C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment 4CDFCC9F800D44D0F2B7FEDE7245CFB5classes

>javac: Compiling 16 source files to C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment 4CDFCC9F800D44D0F2B7FEDE7245CFB5classes

>javac: ERROR: C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment 4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_ocacomsapdemoemployee_scserviceimplEmployeeService.java:8: package myres does not exist

>javac: ERROR: import myres.TestA;

there is only sap.comtcmobileocaapi~api.jar in the class path and myres.jar was not added.

how can i fix my problem or does the steps in the wiki not work yet for SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 ?

Thanks,

Ismet

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 28, 2008 at 10:28 AM

    Hi Ismet,

    in general it is not possible to do it in the same way for handheld projects as it is possible for laptop ones. In the SP3 release, it is hard to deploy jar files out of the box to the handheld and make them available at build time. In the 7.11 and 7.12 release this will be supported officially.

    The only way you could currently follow is:

    1) In NWDS, create an additional DC of type "External library"

    2) Put the jar file to the "libraries" folder of this DC

    3) Create a new public part of type compilation in this DC and put the jar files to it

    4) The DC which accesses the library should have a dependency to this public part

    5) At runtime, copy the jar files to the lib folder as it is done for laptop

    Hope this helps

    Regards,

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Guys,

      I have the same problem, I want to use external jars on mi local DC project (webdynpro for laptop). When I'm trying to donwload the Mobile Component to my mobile client from the server, the server showme that there is an installation problem. I don't know if I have the SR3 plugins form mobile, how to check that, and where can I download this plugins?

      Best Regards,

      David Faustini

  • avatar image
    Former Member
    May 28, 2008 at 10:12 AM

    Hi,

    Try to rebuild the DC after adding the external jar and see if you have any build errors. Try to refresh the DC and click on update project settings after adding the external jars and then rebuild and deploy.

    Hope it works.

    Best Regards,

    Siva.

    Add comment
    10|10000 characters needed characters exceeded