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]

Similar Messages

  • Using a jar file in my application... how?

    I have a JAR file which contains some classes I need to use in my application. I however, after looking in several books, cannot figure out how to use this JAR file within my application.
    Do I simply put it in the directory with my .java files, and use an import command? I'm confused.

    If the classes in the jar are part of a package then you can import them based on the package structure. The jar file will have to be part of your CLASSPATH variable.
    i.e.
    myUtils.jar
    resides in C:\"My Classes"
    CLASSPATH = .;"C:\My Classes";"C:\My Classes\myUtils.jar"
    within the jar I have the following class:
    \ameyer\Util\someUtil.class
    \ameyer\Util\anotherUtil.class
    To use these classes I could use the following import statement
    import ameyer.Util.*;
    This would import any class at that level in the jar.
    Note: the import part of the CLASSPATH is "C:\My Classes\myUtils.jar"
    hope this helps.

  • 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 use a excel file to create a service component?

    Dear all,
       I want to use a excel file to create a service to be my data source. I used the wizard to do that but i always got a message. "The data format is not valid, fields in each record must be delimited by tab charactors, and each record seperated by new line charactors". How should I reformat my excel file to fit the requirements? I have already chang the field`s format into 'text' type. Thx ^^

    Hi Louis,
    [Here|http://img125.imageshack.us/my.php?image=exceltestlo7.jpg] is the result of your data.  I downloaded your excel sheet and created a simulated service in 7.1.1 and it works fine.
    Below are the steps:
    1. Go to Tools -> service component wizard
    2. The popup opens : Step1 :  Enter the name of your service component
    3. Go to Excel spreadsheet Copy the data for which the service needs to be created.
    4. Step 2 : Paste the copied Excel data in the popup
    5. Step 3 : Define Input -> just click next
    6. Step 4: Define Conditions -> just click finish.
    Let me know if it helps.
    Good Luck,
    Dharmi

  • Problem using misc jar-Files in Composite Application

    Hi there,
    I want to use different jar-Files in my Composite Application on SAP Netweaver 7.3.
    I have created an external Lib DC where I have inserted the libs. After that I created an enterprise EAR and added the dependency to the PP of the external lib DC.
    After that I added the a dependency to my CAF-EAR. But I cannot access the mehtods and functions from my jar files.
    What's wrong there?
    Another question: Is it possible to add the jar-files directly to my CAF-EAR without creating the external library DC and adding a dependency?
    Any help would be greatly appreciated
    Thanks

    Hi, I've downloaded Jacob and got it running on my installation by doing the following:
    1. Download http://danadler.com/jacob/jacobBin_17.zip.
    2. Extract to Jdeveloper10g/jdev/lib/ext/Jacob
    3. Copy jacob.dll to c:/windows/system32
    4. Add JDeveloper10g/jdev/lib/ext/Jacob/jacob.jar to JDev user libraries, calling it 'Jacob'
    5. Add the 'Jacob' library to the project.
    6. Create a word document at c:/java/jacob/file_in.doc
    7. Create a new class with the following code:
    package view;
    import com.jacob.*;
    import com.jacob.activeX.ActiveXComponent;
    import com.jacob.com.Dispatch;
    import com.jacob.com.Variant;
    public class TestJacob
    public TestJacob()
    * @param args
    public static void main(String[] args)
    TestJacob testJacob = new TestJacob();
    testJacob.runTest();
    public void runTest()
    boolean tVisible = true;
    String sDir = "c:\\java\\jacob\\";
    String sInputDoc = sDir + "file_in.doc";
    ActiveXComponent oWord = new ActiveXComponent("Word.Application");
    oWord.setProperty("Visible",new Variant(tVisible));
    Object oDocuments = oWord.getProperty("Documents").toDispatch();
    Object oDocument = Dispatch.call(oDocuments, "Open", sInputDoc).toDispatch();
    }

  • 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 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 reuse a jar file in another application

    i have created a jar file.Now i want to reuse this jar file in another java program.Could anyone please guide me with the steps of how to reuse a jar file

    i have created a jar file.Now i want to reuse this
    jar file in another java program.Could anyone please
    guide me with the steps of how to reuse a jar fileput your jar file in class path and import the class which u want to reuse in your code so that u can access all the methods in that class in ur code.

  • 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 do we use our .jar file of Re-Usable Business Components in 11g?

    Hi All:
    We have developed a library of re-usable Business Components in 10g utilizing the instructions found here:
    http://download-west.oracle.com/docs/cd/B31017_01/web.1013/b25947/bcadvgen007.htm
    We are now planning on migrating to 11g, so we need to know how to implement this re-usable business component library.
    Is it possible to use it as it stands created in 10.1.3.3?
    Or do we have to migrate it over? And how is this done since we still have applications that use it in 10g?
    Your input is very appreciated since this is an important step in our migration plan. Doing this correctly is crucial to our shop. We have been trying a few things, so far with no luck.
    Thanks very muich.
    Mary
    UofW

    Shay:
    My colleague that received the errors is going to unexpectedly be off for a few days, so I tried to re-create the errors so that I could get back to you. What was essentially happening was that on certain tables, the first column was missing from the EntityImpl. These tables MIGHT be those that had a primary key that when JDev removed the underscore, had the same name as the Oracle table. For example the table name was ResidenceCode and the primary key of that table was Resident_Code and was found as the first column in the table. HOWEVER, when I tried migrating our reusable business components libarary .jar file, using 11.1.1.2.0, I did not experience the same errors, so I'll get back to you. She was perhaps using an older version of 11g?
    But I do have one question. Can we use a .jar file of reusable business components built in 10g in 11g? As you can imagine, this library is being used in other applications, and we'd like to prevent having two copies, if at all possible. Because of all the structural changes, I am guessing we can't, but I'd really appreciate your reply.
    I have found the documentation *36.7 Working with Libraries of Reusable Business Components* at http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcadvgen.htm#CHEFECGD with respect to 11g. If you know of any other 11g considerations with respect to this task, that would be great as well.
    Thanks Shay, I really appreciate hearing from you.
    Mary
    UofW

  • How to load a Jar file in the class path?

    How to load a Jar file which contains class files, images, etc.. in the classpath without using URLClassLoader.

    You don't "load" jars. If it's on the classpath, you can obtain individual resources from it using various methods on either Class or ClassLoader. Do you mean "how to add a jar to the classpath at runtime"? Can't be done without using a classloader, typically URLClassLoader or a subclass thereof. Why you want to not use the proven method is beyond me. Presumably because you don't understand classloading. In which case, forget it.

  • How to create a jar file as a library in java?

    Let me put it simple: rb.java is already put under /home/jiane/rb/rb.java;
    the tar file rb.tar being located under /mylib/rbcore/, the test client is put under /home/jiane/test.java. now rb.java looks like
    //// rb.java
    import java.until.*;
    public class rb {
    %>jar cvf /mylib/rbcore/rb.jar /home/jiane/rb.class
    test.java as below
    //// test.java
    import mylib.rbcore.*;
    import java.until.*;
    class test {
    %>export CLASSPATH="/mylib/rbcore/rb.jar;."
    %>javac test.java
    %>test.java:1 package mylib.rbcore does not exist
    so, how to make adjustment to rb.java & test.java so that I can make use of jar file rb.jar. please shows the steps to do. thanks a lot.

    import mylib.rbcore.*;This assumes the package mylib.rbcore and imports all its classes.
    But the source of the class does contain package statement, so the class is in the default package.

  • How to make a jar file downloadable with IE

    hello,
    I just bought a website:
    http://www.frozenfountain.net/
    and I put a jar file on it called Logo.jar
    Using Mozilla, the jar file downloads as expected, but with Internet Explorer, it tries to download it as .zip file.
    How do I get it to download as a .jar file with IE?
    thanks

    Just post a link to the Jar. Mozilla will download
    it as a jar. Windows will download it as a zip.
    Only one link. No problem, really. ;-)There is a problem. People who arent as good with computers as you are won't know how to run the jar file after downloading with IE.
    At school, I told someone to download the file, which they did with IE. It downloaded to desktop as a zip. They extracted and were left with a bunch of .class files.
    On a sidenote, how do you draw text with a gradient?

  • How to use other jar with my executable

    Hello everybody
    I'm developing project in JBuilder which uses BC library "bcprov-jdk15-137.jar" This jar I got in reguired libraries section and it work fine in case that I run my application through JBuilder. Now I created executable jar file for my application but it works wrong. I don't know what dependencies shall I setup in JBuilder
    Can somebody help how can I run my application from jar file and I will use BC lilbrary without problem ?.
    What all shall I setup for correct work ?
    Thanks

    Hello
    I created new project(Frame application) in JBuilder 2006, Im using mentioned library therefore I put it into reguired libraries in project setting. When I run application through JBuilder (F9) it works fine.
    Now I would create executable jar file from my project, which will use this mentioned library. My project has one class CMTModule.class with main function. I created jar file via achrive wizard(AppletJAR). There are options of dependency rules in this wizard, so I choose Includes dependencies. Then I created manifest file and insert this item Main-Class: cmt.CMTModule.
    My application start but works wrong , I mean that there is problem with necessary library is not imported. How can I set up it in order to my executable jar can use this library without problems, because in JBuilder all works fine.
    What's is wrong ?
    Thanks

  • How to call a jar file from oracle forms (6i)

    Hi,
    I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
    thanks.
    duminda

    I created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
    then i tried to run it in application server. its still not running.
    can you tell me what i have to do within my bean class? or can you suggest any solution?
    thank you.

Maybe you are looking for

  • Wifi doesn't work after 4.0.1-1 kernel update

    Hi. I use 64bits archlinux, today I've updated linux from 3.18.6 to 4.0.1 and then my wifi card cannot connect to my net, network manager asks me for my password (although the password is obviously well typed). Downgrading linux to 3.18.6 solves the

  • ICal can no longer Backup onto iDisk - goes into endless hang .

    My family is in several locations (school - 2 homes). We have .Mac Family Account, where 5 users have the same 'Shared' folder in iDisk. Whenever we make changes to iCal, we always Backup onto the iDisk 'Shared' Folder... The next person dowlnoads th

  • Mac-formatted FAT32 external drive: cannot read with windows

    I'm posting here in the hopes that it's a mac problem. I have 2 external drives, each USB and each very large (120+GB each). both contain a few files larger than 4 GB each. I formatted each drive using my Mac, one in Leopard and one previously in Tig

  • Problem: bpel deployment with xsd choice

    hi! i have the problem that after deploying my bpel process i dont see the choice defined in my xsd. with a very simple example the choice just dont show in the bpel console. (bpel processes => initiate => xml source just shows the xml without the ch

  • How do I arrange songs in a particular order without modifying the tag info

    Hi. I'm trying to arrange songs in a playlist to play in a certain order without having to permanently modify the tag information like track number. Can this be done? Thanks!