ADD EXTERNAL .JAR

Good morning.
      I need to add an external library to my project. The library is the Apache POI (http://poi.apache.org/). Anyway, I do not know how to do it because it gives me many problems. I tried modifying the classpath and placing it in the lib folder of the project from "Navigator". Also project properties, add. jar outside, and throws me the following error:
The project not was built STI Since classpath is incomplete. Can not find the file class for java.lang.Iterable. Fix the classpath Rebuilding Then try this project. "LocalDevelopment ~ name ~ vendor."
Also this:
Indirectly this compilation unit references the missing type java.lang.Iterable (typically Some required class file is referencing a type Outside the classpath).
Given these errors, I know my includes without problems and I can instantiate objects from library classes, but these errors I can not deploy.
I read the following link:
/people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components
but my version is 2.0.14 NetWeaver. On the other hand, did not understand because they do not know how to add "External Library DC. "
Infinitely appreciate any help. Thank you very much.

I'm trying to work with POI that can be found in http://poi.apache.org/. The. jar I'm adding are
commons-logging-1.1.jar
junit-3.8.1.jar
log4j-1.2.13.jar
poi-3.7-20101029.jar
poi-examples-3.7-20101029.jar
poi-OOXML-3.7-20101029.jar
poi-OOXML-schemas-3.7-20101029.jar
poi-scratchpad-3.7-20101029.jar
Of the code is
HSSFWorkbook HSSFWorkbook book = new ();
/ / Create a sheet inside the book
HSSFSheet libro.createSheet leaf = ();
/ / Create a row within the sheet
HSSFRow row = hoja.createRow (0);
/ / Create a cell within the row
HSSFCell fila.createCell cell = ((short) 0);
/ / Create the contents of the cell and gets into it.
HSSFRichTextString HSSFRichTextString text = new ("hello world");
When I look for the "Organize Imports" I do not recognize any other additional library
Edited by: Daynet1840 on Feb 26, 2011 3:19 PM

Similar Messages

  • How to add external jars in the configuration of JSmooth?

    Hello,
    I am trying to create an exe file from a java program using JSmooth.
    The program is a simple hello world proogram.
    I am developing under eclipse, and I am using some external jar files as libraries.
    If my program is simple,; it works fine. If I add an import of a class that is in one of these jar files, I get the following error when executing the created .exe file:
    "Could not find the main class. Program will exit".
    I guess I have to add this Jar file to the path for the creation of the .exe file.
    My question is: does anybody know HOW to add an external jar in the configuration of JSmooth for the creation of an exe file from a Java program?
    Thanks for your help
    Philippe

    i have the same problem phsans
    you know the answers??
    thanks phsans:D

  • How to add external jars when deploying webapp via worksop for wls 9.2

    While attempting to deploy my web application using Workshop for WLS 9.2, WLS complains it is unavailable to resolve references to a 3rd party JAR(tomhawk.jar) which is being referenced by the JSPs. I have added the JAR via the J2EE module dependancy tab in workshop but that does not seem to be helping the deployment.
    If i build the web application outside workshop and include the tomhawk.jar in the WEB-INF/lib folder of the deployed WAR file, the app works fine.
    I have attempted to copy the tomhawk.jar into the <domain>/lib folder and restart the weblogic server. But this does not seem to help resolve the references.
    Any clues on how i could achieve iterative deployments via workshop for WLS 9.2 pickup references to external JARs being referenced by the JSPs.
    Thanks
    Ramdas

    Raj,
    Thanks for your suggestion. The link that you sent out was useful. I was actually able to get the webapp to resolve its references to the 3rd party classes by adding the tomhawk.jar as an external jar via the "build path" property for the web project. I tested this by running the app in the WLS instance hosted by workshop and looks like the JAR from the build path gets somehow referenced during run time too. Not sure how this works?
    Thanks
    Ramdas

  • Java Mapping - add external jar for runtime use

    Hi,
    I have implemented a java mapping which executes an XSLT transformation on the input XML. This way I can control (I hope) what XSLT processor is used, as I want to use the SAXON XSLT processor. The java mapping executes fine locally in NWDS.
    But when executed runtime I get the following error in default_trace and the message stops in Integration Engine:
    javax.xml.transform.TransformerFactoryConfigurationError: Provider net.sf.saxon.TransformerFactoryImpl not found
    In my java mapping I have set the following:
    System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");
    The TransformerFactoryImpl class is implemented in saxon9.jar.
    Where do I store the saxon9.jar on the server so that it will find it during execution?
    Any hints are most welcome!
    Br,
    Kenneth

    Hi Kenneth,
                          First of all java mapping procedure has the capacity to transform XML using SAX or DOM parser directly. I am not sure as to why you need "SAXON XSLT processor" for the purpose.
                           Now coming to your question  "Where do I store the saxon9.jar on the server so that it will find it during execution?"
    In NWDS import the jar file saxon9.jar within your package, where you have written the source code. This you can do using File->import ->(ZIP or jar file).    Before you import slect the package or folder where you want to import the jar file. Once jar file import is complete execute the code once, see if its running properly. Then choose file->export and select all *.java and *.class files in your package. Save this under one filename say package.jar.
    Finally import this jar file in PI server by usual methods.
    Hope this solves your problem
    regards
    Anupam

  • 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 include an external jar file in .EAR project

    Hello All,
    I have created a web service through java class in sap netweaver 7.1.
    For database connection i want to add external jar file as reference. could you all please tell me how to do this or can i get some scenario where it is explained.
    Please Help
    Regards,
    Vanita Jain

    Hi Vanita,
    open your project in nwds > right click on the project > click on properties option from the menu > click on java build path from the left-side navigation of the window > and click on libraries in the right side tab > here you'll get a button called add external jars > clicking to this, will open browser window to select a jar file.
    Regards,
    Sen

  • How to add SDK jar file in NWDS

    Dear Friends,
    Currently i have an issue. I have to bring the BO favorite to my Portal Screen. My Portal is developed in PDK.
    I have few links where the source code is writhen. Those link's are
    /people/michael.nicholls/blog/2010/02/22/using-the-pdk-to-access-businessobjects-infoview
    http://wiki.sdn.sap.com/wiki/display/Snippets/ReadInfoViewfavoritesfromthe+portal
    I don't know more about BO. I have few points which i mentioned below.
    1) How to add SDK jar file in NWDS.
    2)DO i need any specific package for that.
    Kindly help me with your Valuble suggestion and document.
    Thanx in Advance.
    Prashant Krishen

    Hi,
    for adding all the jar files in NWDS fallow below steps
    windows >> preferences >>Java>>Java buildpath>>Libraries>>add external jars
    Hope this helps
    Edited by: polaka123 on Nov 13, 2010 12:44 PM

  • External Jars in program

    Hello,
    Sorry I know it's not an eclipse forum, but I couldn't get answers anywhere, so I hope someone here can help.
    I have browsed the net a lot, and found that a lot of people are having similar issues, however I did not manage to make this work .
    I have an rcp application which is just a GUI for using my application.
    I also have another eclipse java project which has the core classes.
    I want people to be able to use either the GUI or directly the JAR file created out of the second project.
    Now the troubles :
    the second project uses external jars, which I do NOT want to be packaged. I want the users to get those jar separatly and place them in the appropriate folder.
    The first one (GUI) uses the second project (well it uses its jar file).
    Inside eclipse I can make it work fine, problems come whenever I want to export either the GUI or the JAR from the second project.
    What I would like to achieve is the following :
    1) If they want to use the GUI, then there is a lib folder in its tree where they have to place all the external jars (and maybe the second project jar too, well I guess)
    2) If they want to import the second projet jar in their own application, they have to get the external jars too and place them .... (somewhere? same directory I believe)
    Now I have tried everything I found on the net without success : Add External Jars, add Jar, runtime tab, build-path, class-path, Project dependency, manifest etc ... in second or both projects.
    I know the solution is somehow in those, but I just can't get it to work. Usually I get export errors on the RCP, sometimes its during execution.
    If anyone could explain me step by step what I should do to achieve what I need, I would greatly appreciate it because it's kind of driving me mad.
    Marh

    On 22-Jun-11 06:11, [email protected] wrote:
    > Hi,
    >
    > I am new to Java world and surely to eclipse, after years using Delphi.
    > I am learning to become a real Java developer utilizing eclipse. In my
    > starting pace I found so amuzed and also confused about Java. Every try
    > to write a simple program I always use so many external JARs in my Java
    > project. Is there any pitfall using exessive external JARs in a project
    > ? And how can I know not to use certain external JAR without
    > try-and-error removing one by one ?
    >
    > Thanks in advance,
    > Zhou.X.B.
    Don't worry about how many JAR files you end up using. Don't go out of
    your way to add JARs unless you know you need them. Typically, you write
    code based on what you learn from research and add the JARs you need.
    Usually, you won't acquire a lot of unnecessary JARs, but even if you
    do, it doesn't hurt (except for a bit of diskspace).
    Later, you'll discover which JARs you did or didn't need.
    In short, don't worry about this. Just move ahead. You're on the right
    track since you chose Java in the first place.
    ;-)

  • 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

  • Do I need toload external jars

    Hi All,
    I am using hssf API (org.apache.poi.hssf.usermodel.HSSF) which is nothing but API for writing into Excel sheet.
    I have created a jar file using Eclipse when I run the same jar file from command prompt I get the error
    C:\New Folder>java -jar TextToXls.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/hssf/
    sermodel/HSSFWorkbook
    at JavaTxtXls.<init>(JavaTxtXls.java:14)
    at JavaTxtXls.main(JavaTxtXls.java:34)
    I guess its not able to load jar files associated with HSSF ..so can anyone please tell me how to rectify it..
    I mean to say how do we add external jars with the jar which we wish to execute by double click..
    One of my friend asked me to create a batch File and set classpath during runtime and then call the java file..any better solutions..

    You have to add the relative path to your external jar in your manifest.
    For example, when you create a jar file, it has a META-INF folder. Inside this folder, you will find a manifest.MF file. Open it with a text editor and it should look like:
    Manifest-Version: 1.0
    Main-Class: YourMainClass
    Then, you add a new line to show where is your external jar:
    Manifest-Version: 1.0
    Main-Class: YourMainClass
    Class-Path: externalLibrary.jar
    Note that in this case, your external jar should be in the same directory as your jar application.

  • Adding external Jar's to Web Dynpro DC

    Hi All
               I want to add external jar's to a web dynpro development component but when i add the jar and rebuild the project by right clicking on project and then Development Component ===> Build / Refresh from DC settings then automaticaly the added jar's get removed
               Is there any other process to add the jar's in DC like what we do in normal dypro project. or what could be the issue.  I add the jar by properties ===> Java Build Path ==> Add External JAR's
            Please guide me I am totaly confused
    Thanks
    Ninad

    Put the ejb project in the projects required by the WebDynpro project (Java build path) in order to get it to compile succesfully.
    <b>Now you have 2 options:</b>
    1. You can then export your EJB methods as a web service and import these methods as a model in the WebDynpro project.
    <i>After this you can call your web service (ejb methods) from your webdynpro app.</i>
    2. Instatiate your EJB classes from jndi context as ejbs are normally used.
    Context initctx = new InitialContext();
    Object objref = initctx.lookup("java:comp/env/ejb/YOUR_EJB");
    YOUR_EJB_CLASS myEJB = (YOUR_EJB_CLASS) objref;
    <i>Call the methods from the myEJB object.</i>
    <u><b>If this solves your situation, points would be greatly appreciated.</b></u>
    Best regards,
    Homer Vargas
    SAP EP Development Consultant
    SAP Web AS Development Consultant
    SAP Andina y del Caribe

  • Everytime need to add jxl.jar before rebuilding the project

    Hello,
    Everytime I have to add jxl.jar in the workspace before rebuilding the project as its path is lost.
    Is there any way out to resolve this problem??
    Thanks n Regards,
    Mandeep

    hi..   
    If you want to add external jar files ...
    and If your WD components are in DCs then you may simply solve the problem by creating External Library DCs and as usual, create a public part out of it and add to the dependencies of your WD DC.
    Follow the following steps  to create an External library and adding it to your dependent DC
         1)Go to File->New->Developmentcomponent
         2)In Window opened select Mycomponents and click Next
         3)In the Window opened Give Name(for example ExcelLib) for                                                external library    and select Type as External Library
         4)Click on Finish
    The  External Library  created is visible in Navigator perspective but not in WebDynpro Explorer perspective
         5)In the folder libraries of the externallibrary(ExcelLib) you paste the jar  file (jxl.jar).
         6)Right Click on the jarfile that you have added in the libraries folder of the  External Library ,go to Developcomponent -
    >add to public part
    7)In the widow opened give the some name  for puplic part and say ok 
    8)Now Right click on the ExternaleLibrary ,Goto DevelopmentComponent --->build
    After build is completed this External Library Dc can be used by other DC As
    Used WebDynpro Components ..where the jar file features ca be accessed    
    Regards
    Madhavi

  • Adding External jar file in webdynpro in CE 7.1 EHP 1

    Hi,
    How to add external jar file in webdynpro component. I am using CE 7.1 EHP 1 SP04 .Public part of external library is used in the webdynpro dc.  I created Enterprise Application and used that in runtime in the wybdynpro dc also.
    I am not getting any error at the time of deploy but at the time of activating getting the following error.
    ERROR: E:\usr\sap\CED\J10\j2ee\cluster\server0\temp\CBS\1\.B\354\t\65FFED04CAA1231EE16A570686EC24D6\gen_wdp\packages\com\sap\home\ovsuser\ovsuserapp\comp\OvsUserComp.java:23: package com.sap.security.api does not exist
         [javac] ERROR: import com.sap.security.api.ISearchAttribute;
         [javac] ERROR:                             ^
         [javac] ERROR: E:\usr\sap\CED\J10\j2ee\cluster\server0\temp\CBS\1\.B\354\t\65FFED04CAA1231EE16A570686EC24D6\gen_wdp\packages\com\sap\home\ovsuser\ovsuserapp\comp\OvsUserComp.java:24: package com.sap.security.api does not exist
         [javac] ERROR: import com.sap.security.api.ISearchResult;
    Please help.
    Raktim

    Hello Raktim
    com.sap.security.api should be available within NWDS plugins and should work fine if you add sap-jee DC as used dc.
    For external jars check this link
    [http://wiki.sdn.sap.com/wiki/display/Java/Externaljarfileerrorand+Solution]
    works fine in netwever 7.01 .
    Regards

  • Give me a convenient method to add an external jar file to JRE.

    At past, when i use some external frameworks like struts,servlet, i should set the classpath as:
    .;C:\jdk1.5.0\lib\tools.jar;C:\jdk1.5.0\lib\xercesImpl.jar;C:\ApacheGroup\Tomcat 5.5\common\lib\servlet-api.jar;C:\ApacheGroup\Tomcat 5.5\common\lib\struts.jar;C:\classes\;C:\ApacheGroup\Tomcat 5.5\webapps\struts-blank\WEB-INF\classes\
    when i want to use an exeternal framework, i must add the %INSTALL_PATH%\someframeworkname.jar to the classpath.
    But i feel that is inconvenient for me, for example,I want to use jaxp,jaxr,jaxm,jaxrpc,saaj, I must add each of the jar file to the classpath.
    I think that must be a convenient method to do that?
    Can u give me a method?

    hi
    As I think u have to follow this step to use external jar in jre.
    1. Find installed jre path in one variable
    2. At Installation time add jar file to lib
    U can get jre path using System property

  • Help need in Adding External jar files.

    Hi all,
    Iam developing ADF application using JDEV 11.1.1.3.0.
    I need to move files from one directory to another so i have used external jar "commons-io-1.4.jar" file.
    i did this by going to the project properties -->Libraries and Classpath -->Add Library
    added the jat file.
    In java class i have used the function
    File.copyFileToDirectory(reQueueFile, TargetLocation,false);
    it was working fine when i tried in IntegratedWeblogic server but when i deploy in Standalone Weblogic server its not getting the jar file.
    Its throwing me the exception
    javax.el.ELException: java.lang.NoSuchMethodError: org/apache/commons/io/FileUtils.moveFileToDirectory(Ljava/io/File;Ljava/io/File;Z)V
    at com.sun.el.parser.AstValue.invoke(AstValue.java:161)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1303)
    Please let me know is there a way of adding the lib to the project.
    Regards,
    Suresh kumar.k

    First you should check that the library has the checkbox 'Deploy by default' is checked for your library.
    The you open the project properties of the view controller project, select Deployments, edit the deployment descriptor. Select the Node 'File Groups'->'WEB-INF/lib'->'Contributors'. this should give you a list of libraries your project uses. Check if your library has the checkbox checked (is selected fro deployment). If it's not checked, set it.
    This should include the library.
    Timo

Maybe you are looking for

  • I am finding that when I click on a PDF it may open one day, but the next day it doesn't or vice versa

    I am finding that opening pdf links tends to be spotty. Sometimes a link opens, but other times it doesn't. I know there's a lot of variables at play but was hoping someone might be able to provide some insight on how to resolve this, or at the very

  • IPad mini screen won't orient to landscape

    My iPad mini is up to date and I have checked the general screen and toggle settings but the screen won't rotate to landscape. How do I fix this?

  • Looking for LabVIEW job in Beijing,China

    Seeks the LabVIEW part time job, if appropriate knocks, it can change to full-time job. The following is the simple introduction,I hoped it can help you to understand me. I had worked for more than 5 years in the China Aerospace Science & Industry Co

  • MBO/OSA - How to get the final score

    Hi, Does someone here knows where or how I can find the final score to an appraisal? Is there any table or function module that I can use to fetch the final score? Thanks.

  • Assets missing from overlay

    I am working with a folio created by another designer. I have linked all of the files and made sure that the links panel is not showing any missing assets. However, when I upload this folio to the folio builder for testing, I get an error message say