cancel
Showing results for 
Search instead for 
Did you mean: 

Adding external application in Laptop 7.1 application

Former Member
0 Kudos

Hi,

I have to use my custom created jar files, which contain a swt application in my Laptop webdynpro application.

I followed the blog Link:[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9517] [original link is broken] [original link is broken] [original link is broken];.

I created a DC of type external Library(extlibdc), added the jar files in the library folder of the DC, created public parts of type compilation and assembly, added the jar files to the public parts, build the dc. It went fine and the DC got built.

then i created a DC of type J2EE enterprise application(j2eedc), created a dependency with my DC of external lib type, added the public part of type assembly.

Now in my application DC(appdc), I added the dependency to the extlibdc with design time. Added the compilation type Public Part to this DC. Then added a dependency bet j2eedc and added the assembly type to public part.

Now When i try to instantiate the java classes present in the the jar file, its unable to identify the java class, so i added the jar files as external library to the appdc java build path. After this i was able to access the java class present in my jar file. But When I build the appdc, it gives me build errors as below

[javac] Compiling 14 source files to D:PriyaNewWorkspace.jdiLocalDevelopment D910FAAE25BBCA27FF051E749146AD99classes

[javac] ERROR: D:PriyaNewWorkspace.jdiLocalDevelopment D910FAAE25BBCA27FF051E749146AD99gen_wdppackagescomsapdemodynamicuicompdynamicuicompDynamicUICompView.java:20: package com.sample.test does not exist

[javac] ERROR: import com.sample.test.MainFrame;

[javac] ERROR: ^

[javac] ERROR: D:PriyaNewWorkspace.jdiLocalDevelopment D910FAAE25BBCA27FF051E749146AD99gen_wdppackagescomsapdemodynamicuicompdynamicuicompDynamicUICompView.java:115: cannot find symbol

[javac] ERROR: symbol : class MainFrame

[javac] ERROR: location: class com.sap.demo.dynamicuicomp.dynamicui.comp.DynamicUICompView

[javac] ERROR: MainFrame newObj=new MainFrame();

[javac] ERROR: ^

[javac] ERROR: D:PriyaNewWorkspace.jdiLocalDevelopment D910FAAE25BBCA27FF051E749146AD99gen_wdppackagescomsapdemodynamicuicompdynamicuicompDynamicUICompView.java:115: cannot find symbol

[javac] ERROR: symbol : class MainFrame

[javac] ERROR: location: class com.sap.demo.dynamicuicomp.dynamicui.comp.DynamicUICompView

[javac] ERROR: MainFrame newObj=new MainFrame();

[javac] ERROR: ^

[javac] 3 errors

Please let me the steps where i am going wrong.

Regards,

Priya

Edited by: Priya Ghosh on May 17, 2010 7:39 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Priya,

Try having both Runtime & Designtime Dependency to the external library in your mobile project, might resolve the issue.

Will directly adding the external jar in Java Build path will not work?

Best Regards,

Amit

Former Member
0 Kudos

Hi Amit,

I have given both runtime and design time dependency while adding the dependency to the external lib dc. It does not work.

the first thing i tried was to just add the library as an external lib in the java build path but it doesnt work.

The problem is when I try to access the classes present in the jar file and try to do a dc build, I start getting error as shown below

D:\Priya\NewWorkspace.jdi\LocalDevelopment\t\FA6C48AB4BC266DA00024B2A2E1260B6\gen_wdp\packages\com\sap\demo\testdcc\testdcc\comp\TestdccCompView.java:20: package com.sample.test does not exist

Regards,

Priya

Former Member
0 Kudos

Hi Amit,

FYI, I am invoking a swing application in the webdynpro application, I try to attach 2 jar files as external libs, first jar is the swing application file and the 2nd is the swing-layout-1.0.4.jar.

Regards,

Priya

former_member206242
Active Participant
0 Kudos

Hi,

The referred DCs in the workspace do not have a package structure.

Add the DCs under the local development-> laptop DCs package and the add the dependency.

Regards,

Nipun

Former Member
0 Kudos

Hi Nipun,

I am not able to understand this

"The referred DCs in the workspace do not have a package structure."

Can you please elaborate a little more and also for

"Add the DCs under the local development-> laptop DCs package and the add the dependency. "

Do I have to extract jar files and place the folder structure in the workspace for local development?

Regards,

Priya

former_member206242
Active Participant
0 Kudos

Hi,

Seems that package of the custom Jars you created is different from the one where you are using them in the workspace.

com.sap.demo and com.sample.test so it is not able to recognize it properly. IF you have created a java DC either create it using same workspace or create a relevant workspace folder for the same and then add dependency.

Regards,

Nipun

Former Member
0 Kudos

Hi Nipun,

I created the package structure of the custom jar same as that of my workspace and tried to add the custom jar but I still get the same error..

Regards,

Priya

former_member206242
Active Participant
0 Kudos

Hi,

Create you custom jars using the same package as the laptop DC. Build and then add to your laptop project with dependency.

Then check it should work.

Regards,

Nipun

Answers (0)