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

Similar Messages

  • 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

  • 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

  • Using External JAR file within Web Dynpro DC

    Hi,
    I have created a Web Dynpro DC and I need to use an external JAR file.
    I want to use this external JAR file within the same Web Dynpro DC and NOT creating another DC to house the external JAR file as I can see from the blog.
    I have included the external JAR file in the "lib" folder of the Web Dynpro DC.
    When I tried to perform a DC build, it keeps complaining error....
    How should I solve this problem...
    Thanks.
    mike

    Hi Mike,
    Go through the below which might help you.
    Re: Lookup of RFC Destinations
    Re: Import a Java Bean from a different DC
    Web Dynpro References
    Re: j2ee library with webdynpro
    Re: Web Services :HTTP Destination not getting resloved.
    http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm
    Thanks n Regards,
    Jhansi Miryala

  • How to use external java files into my project

    Hi all,
    I need your help to import my external java files in to my project.
    The files are in package folder.
    So how to tell the import command with the path of the folder.
    I read also that I can make a jar file and integrate it into the project.
    How can I make jar file.
    Best regards...

    there is one utility in j2se jar and check the option also
    put that jar file in lib folder of yr application folder
    [email protected]

  • How to import external jar file

    i am using bcprov-jdk14-124.jar file for my project. i can import this jar file through eclipse project properties but this is not worklng when i create jar file for my project. This is worked in eclipse only. i want to use that jar file in my project current path. so any body help me how to import this jar file? ( i am using mac os to develop java project )

    You need to specify the classpath when you execute it outside of Eclipse.
    Kaj

  • Gridworld Case Study - how to use a .jar file with textpad

    Hello,
    I am a student currently working on a project involving the Gridworld case study. While trying to work on my project at home, I discovered that I would get new "cannot find symbol" compiler errors that I had not previously gotten while compiling the same code at school. I am assuming this has something to do with the .jar file included in the gridworld code. How do I get textpad and/or the java compiler to find and use the .jar file and reccognise the classes which i am importing and extending in my project?
    Thanks,
    -Alex

    Thanks, It works for compiler now.
    Now, I write a html to run the applet. appletviewer
    says "
    java.lang.NoClassDefFoundError: ij/process/ImageProcessor
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
    at java.lang.Class.getConstructor0(Class.java:1762)
    at java.lang.Class.newInstance0(Class.java:276)
    at java.lang.Class.newInstance(Class.java:259)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
    at sun.applet.AppletPanel.run(AppletPanel.java:292)
    at java.lang.Thread.run(Thread.java:536)
    It seems the appletviewer can not find the right path for the package. How can I fix this?
    Thank again,
    Hillxy

  • How to handle External Jar files in EJB DC

    I have created a EJB DC.
    I have added the required MDM Jar files to the class path.
    These MDM Jar files are supplied by SAP for integration with Master Data Management.
    But the DC build fails.
    If I create the same project as a <b>REGULAR</b> EJB (non-dc approach)project, everything works fine.
    Qn:
    How to bundle the MDM jars (External jars)in a DC?
    How to create the Public Parts in the DC for the added MDM External Jars?
    How to use the above DC in the EJB DC?
    Basically, I am looking for a step by step procedure,
    to add external jars in a DC.
    And to use the above DC in a EJB DC.
    Any assistance in this regard is appreciated.

    You should not reference the MDM jar files by setting classpath directly. For setting references to it from your EJB DCs , you will have to create a DC of type "External Library". Deploy this DC also before your EJBs are deployed. You will then have to create a public part for this DC and the reference the public part from the DC metadata of the EJB DC ie set the Used DC list of EJB DC to the public part of the ext lib. You will get info about this in NDS help as well on help.sap.com

  • 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 a jar-file in an Application Service - NWDS 7.01

    Hello everybody,
    I want to create an Application Service in SAP NetWeaver Developer Studio 7.01.05. Can you explain me how i can import an external jar into my project?
    I found out that I can implement or create simple java files:
    Java Perspective --> package project_name.utils --> insert/create java file
    I try to add the jar into the java build path of my project, but when i build it the jar is gone.
    I would be very thankful for every hint.

    solved
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60d99678-1a29-2d10-94b4-9d9a67b7199b]

  • 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

  • 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.

  • Problem with using external jar file

    Hi
    I was using mail.jar library for swing application to send and receive emails. It just works perfect when I run with netbeans. But when I run the executable jar file at dist folder it runs but mail related functions doesn't work.What should I do now to make it work with mail features outside netbeans.
    thanks
    vinay
    Edited by: 899657 on Dec 24, 2011 5:07 AM

    899657 wrote:
    No. Because I am running the jar file which is created by netbeansNetbeans creates a 'dist' directory in which it puts your jar and a "dist/lib' directory in which it puts the dependent jars that are added to the project using 'project right mouse click'->Properties->Libraries. I would expect to see this 'dist/lib' directory contain mail.jar and activation.jar and any other jars that your jar needs. Within your program jar's manifest I would expect to see the Class-Path attribute have relative reference these jars ( lib/mail.jar lib/activation.jar ) and for the Main-Class attribute define your main class.
    Given this setup then you should be able to just type -
    java -jar yourjar.jarto run your program.

  • How to use a jar file

    Hi Everybody!
    waits for "Hi Dr.Nick" I need a program that will extract the text from a PDF and I think I may have found it here: http://multivalent.sourceforge.net/Tools/index.html
    However the instructions are a bit wacky and don't seem to work. My goal here is to extract the text from a pdf document so I am going by these instructions: http://multivalent.sourceforge.net/Tools/doc/ExtractText.html
    Currently when I follow the instructions and try to run "java tool.doc.ExtractText a.pdf" I recieve a ClassNotFoundException. the jar file I am using(Multivalent.jar) is currently located is /home/myusername/prog and the current CLASSPATH is also /home/username/prog. Can someone please explain to me what I am doing wrong?
    kthxbye

    Oblivious0823 wrote:
    Currently when I follow the instructions and try to run "java tool.doc.ExtractText a.pdf" I recieve a ClassNotFoundException. the jar file I am using(Multivalent.jar) is currently located is /home/myusername/prog and the current CLASSPATH is also /home/username/prog. Can someone please explain to me what I am doing wrong?You haven't set your classpath correctly. It should include the jar file.

  • How to use external .tld files with uix

    Hey,
    I have a set of custom .tld files and that i was to use in my UIX pages. I got them to work correctly if I am using jsp files but for some reason it doesn't recognize the tags when they are in uix pages
    I far as I can tell, UIX actually requires xml schema definition of the tags and the just the .tld file is not sufficient.
    My question is, is this the correct conclusion?
    if so is there a easy way to either convert my tld file or create this xml schema file so that my tags will be visible to uix.
    or am I totally off the mark here...

    there is one utility in j2se jar and check the option also
    put that jar file in lib folder of yr application folder
    [email protected]

Maybe you are looking for

  • Some nagging CSS image rollover questions

    Hi, I'm using DW CS4 here. I finally got a Top Horizontal Inline CSS navigation to work with CSS image rollovers. Here's the site: http://www.brightbeltmusic.com And here are my questions: -Why, when my original images are 90 px  wide x 30 h, do I ha

  • Dynamic programming( how to read a dynamic node )

    Hi,     i have a node consists of four static and 5 dynamic attributes, how to capture all the data as a table or how do i read full node as a table. i have used get_static_attributes_table( ), it works only for static attributes,but i need to read c

  • After upgrade to Lion, iPhoto will not save events nor save albums after created.

    After upgrade to Lion, iPhoto will not save events nor save albums after created. Once iPhoto is shut down and re-launched, albums and events created no longer exist. How can this be fixed? Also, when attempting to create cards, iPhoto freezes. Messa

  • Difference between type of IViews

    Hello All,     Could anyone please tell me what are the major differences between ITS Iviews and Transaction Iviews?     I am working on ESS using ITS 6.2What is the advantage of using ITS Iviews when the transaction Iviews are also available? Thanks

  • Disappear Segment in DFF

    i want to disappear a segment of AdditionalAssignmentDetailsDFF in notification detail page.please tell me how to do. my way : extends co CUXOfferDetailsNotifStkCO OADescriptiveFlexBean dffBean = (OADescriptiveFlexBean)paramOAWebBean.findIndexedChild