on 05-17-2010 3:06 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.