How to use external jars in NW2004

Hello Experts,
can i use the same approach mentioned in the below Weblog for using the external jars in NW2004.
/people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components
and if not then what will be the best way to achieve it in  NW2004.
Please provide your inputs on above.
Regards,
Siddharth

Hi Sidharth,
If you are using web dynpro DC perspective then you need to follow the following points to use the external jar files in it.
1. Create a external library project.
2. copy the external jars in the library folder os the projects.
3.) Select all the jars from the u201CLibrariesu201D folder, Right click and then select Development Component and click on Add to Public Part
4.Select the first Radio Button (Provides an API)and give some nameto it.
5. Repeat the step no 3 but now select the second radio button other than as selected in step no 4.
6. Now build your lirary DC.
7. Now create a j2ee DC project.
8. ) Expand the node DC Definition and Right Click on Used DC. Select Add Used DC.
9. Select the External Library DC with build time dependency.
10.Right click on the J2EE DC and then select Development Component followed by Build
11. Right click on the J2EE DC and then select Development Component followed by Deploy
now you can use both the libary DC and the j2ee DC in your web dynpro DC as used DC.
But if you have created a web dynpro project only(but not DC) than you can directly add the external jars in java build path
hope this will help
regards
Narendra
Edited by: Narendra Singh on Oct 27, 2009 11:22 AM

Similar Messages

  • How to use external JARs in Eclipse

    Hello.
    I created a jar file like that:
    jar -cvf0 WarShell.jar WarShell.class
    I want to use WarShell.class in Eclipse but it not in my classpath,so I choose [Project] -> [Properties] -> Java Build Path -> Libraries -> Add External JARs and add WarShell.jar to the list.
    But when I run the program I got a Exception:NoClassDefFoundError.
    Why?How to fix it?
    Another question... Your classpath is not available in Eclipse,right?
    Thanks for your time! ^_^

    Hello.
    I created a jar file like that:
    jar -cvf0 WarShell.jar WarShell.class
    I want to use WarShell.class in Eclipse but it not in
    my classpath,so I choose [Project] -> [Properties]
    -> Java Build Path -> Libraries -> Add External JARs
    and add WarShell.jar to the list.
    But when I run the program I got a
    Exception:NoClassDefFoundError.
    Why?How to fix it?Did you run your program from Eclipse ?
    If yes, it should work (or seek for an Eclipse-specific forum.)
    But if not, keep in mind that your project settings are limited to Eclipse. You'll have to define a correct classpath for running your application.
    Another question... Your classpath is not available
    in Eclipse,right?Mine? I don't think it is available for anyone ;-P

  • How to use external jar files ??

    Hi all,
    In my user-defined function for mapping (IR) , I want to make use a Class which is available in an external .jar file.
    Our XI is working on Windows2003 OS. I set the classpath in OS environment variables.
    But it is not working.
    Where I should set the classpath ?
    Can anyone help.
    Thanks in Advance
    Chemmanz
    Message was edited by: Chemmanz

    Hi Chemmanz,
    For user defined functions, it is not necessary to use the external jar files.
    Just follow the below steps:
           1.      To create a new user-defined function, choose <b>Create New Function</b> in the data-flow editor at the bottom of the screen, on the left-hand side.
           2.      Specify the attributes of the new function in the subsequent window:
    Name:
    Technical name of the function. The name is displayed in the function chooser and on the data-flow object.
    Description:
    Description of how the function is used.
    Arguments:
    In this table, you specify the number of input values the function can process, and name them. All functions are of type String.
           3.      In the subsequent window, you can create Java source code:
                                a.      You can import Java packages to your methods from the Imports input field, by specifying them separated by a comma or semi-colon:
    You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since all message mappings require these packages and therefore import them.
    In addition to the standard packages, you can also specify Java packages that you have imported as archives and that are located in the same, or in an underlying software component version as the message mapping.
                                b.      Create your Java source text in the editor window or copy source text from another editor.
           4.      Confirm with Save and Close.
           5.      User-defined functions are limited to the message mapping in which you created the function. To save the new function, save the message mapping.
           6.      To test the function, use the test environment.
    The new function is now visible in the User-Defined function category. When you select this category, a corresponding button is displayed in the function chooser pushbutton bar. To edit, delete, or add the function to the data-flow editor, choose the arrow next to the button and select from the list box displayed.
    Regards,
    Prasad U

  • How to use external jar

    i have downloaded a jar file from apache web site how to use it. i mean where it placed to use class of jar in java file.

    Try putting it in your classpath.

  • How to use external jar in a program

    I am writing a java program which requires The class org.apache.commons.lang.StringUtils and the method StringUtils.upperCase(). I have downloaded the commons-lang-2.1.jar jar and put it in the lib directory under my project directory.
    But while compiling the program I am getting an error like this :
    package org.apache.commons.lang does not exist
    and can not find symbol , symbol : variable StringUtils
    Could anyone suggest me what to do so that the program compiles without error?

    I am using command line javac tool.
    Could you tell me how to tell compiler to include the
    jar.javac -classpath /some/directory/commons-lang-2.1.jar;(other required paths and/or jars) files to compile go here
    Please read tutorials too.
    http://java.sun.com/docs/books/tutorial/
    I would also suggest a good build tool called Ant.
    http://ant.apache.org/
    Message was edited by:
    warnerja

  • Using external Jar with a mobile application

    Hi folks!
       I need some help with my application, i make a simple mobile application and i need to use a external jar, in this case, this jar have a simple JAVA class that represents a manipulation with eSWT, so my problem is How to using external Jar in NetWeaver 7.1?
       I see other threads that have a same doubts, but i don´t have a solution for my problem.
       Thats it.

    Hi Sivakumar,
    I have similar problem. i want use iText or similar jar files to create pdf. I have currently developed a UI component for handheld. I have dont the following things:
    1)Created a external dc of type external library
    2) addedd the jar in the build path
    3) added the jar in the lib folder of the webdynpro project
    4) added the external jar dc as dependency in my webdynpro project
    I am getting no class def found eror still for some wierd reason. please let me know if some step is missing. I have pasted the trace.
    rror starting the framework
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sap.tc.mobile.cfs.startup.pda.Startup.main(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: com/cete/dynamicpdf/Font
         at com.sap.demo.testui.testapp.comp.SignatureStandard.runApps(SignatureStandard.java:88)
         at com.sap.demo.testui.testapp.comp.TestCompView.wdDoInit(TestCompView.java:85)
         at com.sap.tc.mobile.wdlite.progmodel.core.Controller.enter(Controller.java:21)
         at com.sap.tc.mobile.wdlite.progmodel.core.View.enter(View.java:45)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.setCurrentView(Application.java:133)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.navigate(Application.java:169)
         at com.sap.tc.mobile.wdlite.progmodel.core.Application.enter(Application.java:19)
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.setCurrentApplication(WDLite.java:148)
         at com.sap.tc.mobile.wdlite.progmodel.core.WDLite.launchApplication(WDLite.java:80)
         at com.sap.tc.mobile.wdlite.container.ContainerApp.startApp(ContainerApp.java:171)
         at com.sap.tc.mobile.wdlite.container.AppMenuView.onActionLaunchApp(AppMenuView.java:325)
         at com.sap.tc.mobile.wdlite.container.AppMenuView.invokeEventHandler(AppMenuView.java:368)
         at com.sap.tc.mobile.wdlite.progmodel.core.AbstractViewElement.doHandleEvent(AbstractViewElement.java:199)
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.doHandleEvent(UIElement.java:369)
         at com.sap.tc.mobile.wdlite.renderer.api.UIImageButton.mouseReleased(UIImageButton.java:148)
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement.dispatchMouseReleasedWidgetEvent(UIElement.java:412)
         at com.sap.tc.mobile.wdlite.renderer.api.UIElement$1.mouseReleased(UIElement.java:455)
         at com.sap.tc.mobile.wdlite.renderer.swt.MouseEventDispatcher.mouseUp(SWTControl.java:380)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:137)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)

  • How to use external library(in .jar format) in netbeans project?

    How to use external library(in .jar format) in netbeans project?
    Thanks!

    How to use external library(in .jar format) in netbeans project?
    Thanks!

  • Problem using external jars in my java component

    Hi Guys,
    I just wanted to ask how to properly reference an external jar to a java dc. I already have an external library dc which contains my external jars and also compilation and assembly public parts,  a j2ee library which has the assembly public part of the external jars that is deployed to the server, a java dc which has the compilation public part of the external jar.
    My problem is whenever I trigger a method of the java dc in my webdynpro dc I'm having an exception. weird thing is when I put the whole method from the java dc to the webdnypro dc it functions well. So I'm thinking if the interaction between my java dc and j2ee lib dc has to do with this maybe I'm missing some configuration.
    need your insight on this one.
    Thanks,

    Hi TznHuang,
    Pleaserefer to this blog might helpful for you
    /people/raphael.vogel/blog/2008/05/05/how-to-use-external-libraries-in-the-sap-component-model-part-ii
    Also please build external DC and then sync sorurces and sync used DC from inactive DC TAB for DC where you have used
    external DC.
    Hope bit helps
    Regards
    Arun Jaiswal

  • How to use external hard drive and iTunes together?

    how to use external hard drive and iTunes together?

    Yes I did get to that part.... I went trough external to retrive itunes folder... When I selected the folder, it said that it was locked, choose another folder... I then went to my external again to my itunes folder and and used command I to see if folder was locked and it wasn't.... it was suggested on another forum to reboot.. which I did and still same problem... All I want to do is link my external hard drive that has my itunes playlist from another Mac to my new one.. and to also use the external as the main source for adding new songs to my playlist...

  • How to use external Java API in Java Embedd inside BPEL

    How to use external classes inside the BPEL in Java Embed Activity ? Any sample code availble ? Like i want to use log4j API inside BPEL.

    No you dont have to change your startManagedServer.cmd/.sh everytime you need to have a Java Embedding activity. You only need it in case of using Log4J. As log4j requires a configuration xml viz log4j.debug.xml and log4j.dtd you need to let the soa managed server know about it. The best way to load this configuration files is using the JAVA_OPTIONS command during server startup.
    Hope the explanation helps.

  • How to use External Tables

    Hi, I want to know how to use external tables? The procedure i follow for SQL*Loader in my shell script is:
    Call the sqlldr
    Check return code
    If return code = 2. get count of records from bad file and exit.
    If return code != 0 and != 2 then exit as fatal error
    If return code = 0 then continue.
    But i don't understand how to use external table as it is not invoked and does not have a return code.

    Hello,
    What do you mean alogrithim, do you mean to invoke external table as you invoke sqlldr? You can generate external table script from sqlldr and use it to load data but you might have to modify the table name and datafile name . You can see if any bad file generated from sqlldr and if yes then you can generate external table (using sqlldr) or based on your bad file. May be if you can list what exactly you want in bullet points, then it will be easier to suggest you.
    Regards

  • How to use a jar from a external library DC Project?

    I followed the steps of how to create DC, External Library Project, which contains the jar I want.
    I understood that this type of project can't be deployed so I build and deployed other DC Project from the type J2EE server component Library and added it to it's public part. What do I do next, to actually use the jar and it's imports?
    Thank you,
    Meytal.

    Hi,
    Check this:
    Making a JAR file publicly available
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/2ade3fc6c6ec06e10000000a1550b0/frameset.htm
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • How to use external libraries jar files in the composite application?

    Hi,
    I have some external jars files (which consists of java classes) that I would like to use in my composite application. 
    I have created a DC with type as external library for the jars.  However, I don't know how to specify the DC to be used in my caf application.
    Can anyone help?
    Thanks.
    Regards,
    Fui Voon

    Hi,
    My jar files consists only java classes and a manifest.mf. The files are compiled using jdk 1.4.2-b28.  Will this be any issue?
    It seems that if I ignore the error and continue step 7 which is to do deployment of the ear, the error given is
    Cannot update it.
    Caused by: com.sap.engine.library.bytecode.cf.CFException: Invalid constant pool tag, 60 at index 41.
    Does anyone know what that mean?
    Is there any sample that teach how to deploy external libraries as bundled library?
    Thanks.
    Regards,
    Fui Voon

  • How to include external jars - URGENT...

    Hi:
    I am using Eclipse for development.
    My application uses some external jars.
    This step is simple in Eclipse, one simply indicates where the jars are to the IDE.
    However, when I make an executable JAR file from my project, those external JARs are not included.
    So when I run my program, everything is fine until the parts that uses the external JARs.
    Does anyone know how to include them outside of Eclipse platform?
    I am going to see my client in an hour and of course I can't bring my source and install an Eclipse at my client's computer to show them my demo...
    please help... thanx...

    You add those external jars to the classpath or the jars classpath if you're running the program from a jar. Or put the external jar to JAVA_HOME\lib\ext (IIRC)

  • How to call external jar files in EJB project for CE

    Hi,
    I would be thankful if someone could help me with this -
    I need to call the external jar files into my EJB project - Here is what I have done and am getting runtime exception as  -
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    1. Created a EJB  project" HelloWorld "  using Java perspective in NWDS 7.1 called with client as HelloWorldClient and EAR project as HelloWorldEAR.
    2. Am working on HelloWorld project (1st one).
    3. In my code I am instantiating a class which is a class in one of  the external jar file that I need to refer in my project.
    4. I have set the Java Build path but it works only for the compile time and fails during runtime.
    5. Have read I need to create external library DC and refer in my project "HelloWorld".
    Can anyone help me with exact steps what needs to be done - during creation of external library project and then for my "HelloWorld" EJB project. How would I be able to reference or set the external library project in my EJB project?
    Looking forward to hear from experts.
    Thanks,
    Shiv
    Edited by: Shiv Khullar on Aug 30, 2010 9:39 PM

    Hi Edson,
    I tried it , but it still gives me runtime exception.
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/glance/pdf/pt/PTDoc
    Steps I performed are -
    1. Created a library project and created 2 Public parts "Compilation" and "Assembly"
    2. Build the library project.
    Now in my EJB project using Project Explorer - set the classpath and added both compilation jar and assembly jar files.
    This is how the classpath entries for external library looks like -
    <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkAssembly/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkAssembly.jar"/>
         <classpathentry kind="lib" path="/LocalDevelopmentLocalDevelopmentexternallibrarypdftoolsforwatermarkingdemo.sap.com/gen/default/public/WatermarkCompilation/lib/java/demo.sap.comexternallibrarypdftoolsforwatermarking~WatermarkCompilation.jar"/>
    I have also added the jar files I used in my external library project as "User Library" from Java Build Path . I dont do it , then the code fails during compilation itself.
    Regards,
    Shiv

Maybe you are looking for

  • Muse not working

    I just paid you for Adobe Cloud...why is Muse not working?

  • Flash element - change pointer from arrow to hand in Director

    Hi everyone, I build a pop-up box in flash that I want to use in Director. It is sort of a tab, that hides in a corner of the screen and when the user rolls over it, it slides out showing some buttons. How can I tell director to change the pointer in

  • How to open navigation item in new tab?

    Hello Is it possible to open a navigation item in a new tab? for example, when a user enters in MII and in the menu has several links, is it possible, when clicking in a link, to open it  in a new tab? i know it is possible to open in a new window or

  • Organizing Files and Folders

    Where can I find basic correct way to organize folders and files on my hard disc? I restored my hard disc using Apple "Backup" and my files and folders are scattered all over with no discernible hierarchy or method. iPhoto, iTunes unable to access fi

  • Sort photos N8

    How do I sort my photos into a sequence that I want? I opened the photos listing, added some photos to a new album and deleted the original photos as you would do on a computer  (or so I thought) but the result was that all the photos I marked were t