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!

Similar Messages

  • How to use external library in EAR deployed onto J2EE engine

    For certain reasons some classes in .jar file in operation system level should be used in the EAR project I've deployed onto J2EE Engine.
    Can some one tell me what steps I should perform to acheive this?

    hey there,
    Think im already late for this... but it may be useful to someone who reads this forum later.
    I am struggling with exactly the same problem for the past more than 24
    odd hours now. The sad part - Im sure I have seen this being done in a
    matter of a few minutes when my team mate had an older version on NWDS.
    (I am currently using SP16 NWDS). May be this indeed is a bug that SAP
    needs to fix in its SP16 NWDS release.
    I need to use the HSSF POI libraries for my webdynpro components and
    have been trying ALL possible options given out here on SDN. To mention a
    few, I have tried -
    1) Jarrod's method of making a Java DC and then declaring a usage
    dependency for it inside a J2EE Server (library) DC. It didnt work... it
    gave me a warning that an illegal reference has been made to the runtime
    public part. And the final SDA file generated in the J2EE server
    component DC DIDNOT contain the jar files that I had added to the public part
    of the Java DC. On investigating further, I found that there were NO
    entities present in BOTH the public parts of the Java DC, even though the
    folder actually contained all the required .jar files.
    2) Creating an External Library DC, adding the JAR files to the
    'libraries' folder. Creating two public parts, one for assembly and the second
    for compilation. Then adding this DC as a 'Used DC' into a J2EE Server
    (library) DC. Yet, the .sda file that is created on building the J2ee
    Server (library) DC DOESNOT contain the JAR files.
    3) Creating an external library DC, adding the JAR files to the
    'libraries' folder. Creating two public parts, one for assembly and the second
    for compilation. Then adding this DC as a 'Used  DC' into a webdynpro
    DC. On building this webdynpro DC, the .ear file DOESNOT contain the JAR
    files.
    4) Directly adding the JAR files to my own webdynpro component in the
    'src/packages' folder. This didnt work because on rebuilding the
    project, the JAR files get deleted on their own.
    5) Renaming my .JAR files to .ZIP, extracting the entire package
    structure into folders, copy pasting this entire folder structure along with
    its .class files into the src/packages folder. On rebuilding, the NWDS
    deletes these folders and files on its own / behaves erratically. Also
    copy pasted these .class files along with the proper package structure
    into the '/bin' directory of my webdynpro application, but it still
    didnt work.
    The only thing that I have to try yet is to shift to SP10 of NWDS,
    build this external library project and get the required JAR files put on
    the wendynpro server. After that I might choose to get back onto the
    SP16 version and hopefully continue productive work... !
    Regards,
    Navneet.

  • How to use external libraries and JAR files with OpenScript

    Hello.
    I am trying to include ApachePOI, JODATime, and Javamail in my scripts to handle different aspects of our automated performance tests.
    I followed the documentation for Eclipse to be allowed to utilize these external libraries, however, when I attempt to run my tests the classes and methods that are being imported, show up with errors saying that they do not exist.
    I think perhaps that I am using them incorrectly. I cannot see them as script assets, package assets, or project assets using the properties for these items. An error pops up and says those screens are not displaying correctly or display incorrect information.
    If anyone can provide guidance on using these items, that would be great. Right now I'm trying to include them as "previously exported scripts" but I'm not sure that method will work.
    Any advice is appreciated.
    Thanks.
    --tiff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Tiff
    For OpenScript 9.* there is an out of the box solution for that, all you need to do in OpenScript go to:
    Script -> Script Properties -> Script Assets -> Add -> jar File ....
    And that is it.
    Alex

  • Using External Library in Mobile Web Dynpro Offline

    Hi all,
    i would like to use a jar in a Mobile Application for Handheld and i followed the steps from the wiki "Using External Library in Mobile Web Dynpro Offline" at
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/usingExternalLibraryinMobileWebDynpro+Offline
    >How to use External Library in Mobile Web Dynpro Offline
    >For using external jar in local deployment scenario, one can do following:
    >1. In the dc where jar has to be used, add the jar as external jar classpath entry. It can be done via <dc> > (Right-click)> properties->Java Build Path->Select "add external jar".
    >2. Do the programming using the jar.
    >3. Shut down the mobile client.
    >4. Copy the jar in the "lib" folder of mobile client installation.
    >5. Deploy the application in the IDE.
    >6. Run the application.
    >In 5, the jar will not deployed and will be picked from the lib folder during 6.
    >...
    >Note: This will work on and after SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 (and after).
    i get a error at the deployment with the message "...package myres does not exist...":
        >echo:     C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_oca
          >echo:   class path:  C:Program FilesSAPIDECEeclipsepluginscom.sap.tc.ap_2.0.1.080222142948compXOCADCssap.com     cmobileocaapi\_compgendefaultpublicapilibjavasap.comtcmobileocaapi~api.jar
          >echo:   output dir:  C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5classes
         >javac: Compiling 16 source files to C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5classes
         >javac: ERROR: C:Documents and SettingsTPCompworkspace.jdiLocalDevelopment     4CDFCC9F800D44D0F2B7FEDE7245CFB5gen_ocacomsapdemoemployee_scserviceimplEmployeeService.java:8: package myres does not exist
         >javac: ERROR: import myres.TestA;
    there is only sap.comtcmobileocaapi~api.jar in the class path and myres.jar was not added.
    how can i fix my problem or does the steps in the wiki not work yet for SAP Net Weaver CE 7.1 SR3 with Mobile plugins from CE 7.1 SR3 ?
    Thanks,
    Ismet

    Hi,
    1) in Development Infrastructure Perspective -> rightklick in Navigator/Projekt Explorer  -> new Project  -> (Development Infrastructure)  Development Component (DC).
    NWDS generates Project Ressources e.g. the folder "libraries"
    2) copy the jars to the "libraries" folder.
    3) rightklick on the newly created Development Component (DC) ->  Development Component -> Show In ->  Development Properties -> go to the Tab "Public Parts",
    in -> "Defined Public Parts" -> klick on Button "Add" -> give a name for "Public Part" -> at "Purpose" select "Compilation" -> Finish.
    rightklick on the newly created Public Parts -> select  "Manage Entities" and select the jars you want to use -> Next -> Finish.
    4) switch to the Mobile Apps for Handhelds Perspective ->  in Development Component  select e.g. the Service Component or the UI Component ->
    rightklick ->  Development Component -> Show In ->  Development Properties -> got to Tab "Dependencies" -> klick on Button "Add"  -> under the Node MyComponents -> select the newly created Development Component with the Public Parts/jars (that was created in 1 - 3).
    thats all, now you can deploy your application
    Regards,
    Ismet

  • 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

  • Using External Library in a DC problem (SP16)

    Hi,
    I've been trying to get the example that Valery is outlining in his <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro">Blog</a>.
    I've done it exactly as Valery says, but I can't get it to work. I create the External Library DC, add the jar to Public Part (purpose Assembly) and build. Builds ok.
    I then proceed to creating the J2EE Library. It is created ok. I then add the External Lib I just created to Used DCs. This goes ok. I build the DC. There are warnings:
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    And:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    I've tried nearly every combination of Dependency Types When adding the used DC to J2EE DC. The jar never ends up in the SDA file in gen\default\deploy or jar in gen\default\public. I only get different types of warnings.
    Here is the whole build.log:
    Apr 7, 2006 8:48:00 AM /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] WARNING: js/lib: built with warnings orion.com/js/lib(MyComponents) in variant "default" (0.753 sec) :
    Build log -
    Development Component Build (2006-04-07 08:48:00)
      Component name: js/lib
      Component vendor: orion.com
      SC compartment: MyComponents
      Configuration: LocalDevelopment
      Location: local
      Source code location: jarpak@UFIES-JARPAK
      DC root folder: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\
      DC type: J2EE Server Component
      DC subtype: Library
      Host: UFIES-JARPAK
    DC Model check:
              [dcmake] All used DCs are available locally
              [dcmake] validating dependency to build plugin "sap.com/tc/bi/bp/addLib"
              [dcmake] validating dependency to  public part "Tokenizer" of DC "orion.com/js/jars"
              [dcmake] DC model check OK
    Start build plugin:
              [dcmake] using build plugin: sap.com/tc/bi/bp/addLib
              [dcmake] starting build plugin from : C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\
    Build Plugin 'J2EE Library', Version 6.40 SP 16 (630_VAL_REL, built on 2006-02-13 00:17:07 CET)
       development component:  js/lib (orion.com)
          software component:  MyComponents (demo.sap.com)
                    location:  local
                        type:  J2EE Server Component, subtype Library
               build variant:  default
             source location:  jarpak@UFIES-JARPAK
           plugin start time:  2006-04-07 08:48:00 GMT+02:00 (EEST)
                     Java VM:  Java HotSpot(TM) Client VM, 1.4.2_03-b02 (Sun Microsystems Inc.)
    General options:
      convert *.xlf to *.properties: yes
      include sources for debugging: yes
    Warning: Warning: Source folder does not exist, will be ignored: server
    Plugin initialized in 0.03 seconds
    Warning: No runtime information available for development component type External Library (sap.com), cannot validate runtime dependency.
    Preparing data context..
    No 'default' JDK defined, will use running VM.
    Data context prepared in 0 seconds
    Executing macro file..
      Using macro file:     C:\Program Files\SAP\JDT\eclipse\plugins\com.sap.tc.ap\comp\SAP_BUILDT\DCs\sap.com\tc\bi\bp\addLib\_comp\gen\default\public\addLib\macros\build.vm
      Creating output file: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
    Macro file executed in 0.482 seconds
    Starting Ant..
      Using build file:     C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\logs\build.xml
      Using build target:   build
      Generation folder:    C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426
      Using Ant version:    1.5.4
    prepare:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\int-pp
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sda
    compile:
    createPublicParts:
    createDeployArchive:
         [mkdir] Created dir: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\t\C2CEFADCC9470A9F87865E9894AAE426\sdaprep
           [cda] Creating descriptor server/provider.xml ...
           [cda] WARNING: Ignoring invalid runtime dependency on js/jars (orion.com), type External Library
    packDeployArchive:
    [srcpacker] Creating source archive
    [srcpacker] No sources available for packing, no archive will be created.
         [timer] Source archive creation finished in 0.02 seconds
        [jarsap] Info: JarSAP version 20041217.1600
        [jarsap] Info: JarSAPProcessing version 20060104.1634 / JarSL version 20060106.1831
        [jarsap] Property jarsap.info.dir is not set.
        [jarsap] Building: C:\Documents and Settings\jarpak\.dtc\LocalDevelopment\DCs\orion.com\js\lib\_comp\gen\default\deploy\orion.comjslib.sda with compression
         [timer] JarSAP finished in 0.03 seconds
    build:
    Ant runtime 0.161 seconds
    Ant build finished with WARNINGS
    Build plugin finished at 2006-04-07 08:48:00 GMT+02:00 (EEST)
    Total build plugin runtime: 0.693 seconds
    Build finished with WARNING
    What am I doing wrong ?
    Kind Regards,
    Jari Pakarinen

    Hi,
    There is an issue with SP16 in using External library DC.
    Go through this Jars not included in J2EE Library DC SDA. This thread deals with the same issue.
    Hope this helps.
    Regards,
    Rathna.

  • HT5037 How to use iPhoto Library Upgrader

    How to use iPhoto Library Upgrader

    Hello Terence,
    sorry that I come here with a completly different thema but I follow your answers since long and they are always excellent! And I do not know who could help... as I can not find the solution in Apple Support Communities.
    I am very afraid with my MacBook Pro: midd. 2012
    Prozessor: 2,3 GHz Intel Core i7
    4GB 1600 MHz DDR3
    Intel HD Graphics 4000 384 MB
    Software: OS X 10.8.5 (12F45)
    Kernel-Version: Darwin 12.5.0
    iPhoto 11, Version: 9.4.3 (720.91)
    iPhone 4s, 64GB Version:7.0.2 (11A501),
    Symptoms:
    1. I have notice three days ago that Spotlight allways answers I should go to the web when I look for data in my computer. It seems that Spotlight can not find anything from my computer.
    2. Timemachine has no data before the 28th. January 2014 (!?) No idea why this happens
    3. In Finder window when I go to "Alle meine Daten"(= All my data) there is absolutely nothing there...it means 0 objekts are there.
    4.In  Systemeinformationen (=Systeminformations) if I go to Software and then to Programs... there is nothig there because the Plug-In do not react quick enough (Das Plug-In hat beim Sammeln dieser Informationen nicht schnell genug reagiert). I am asking me which Plug-In it is and where to find it...
    5. On my iPhone the Photo-stream suddenly shows only 110 fotos from Dezember on, but in My MacBookPro the iPhoto Stream shows of course the lasts 1000 ones...from 25.01.2013 to 03.02.14 as it did allways before.
    I am not going to sync anything until I discover what is going on...
    6. On my Contacts suddenly appeared the link address of a "game" in my own card ( both in iCloud and Lokal AddressBook)... and I have never ever played an online game (!?). So I deleted this two links as I discovered them some days ago...
    I do not know what is going wrong here but I'm afraid to loose all my data in the computer, so I am making a secure copy in an external drive right now...
    Could it be a virus inside... a software problem may be...?
    The mayor  Problem is how to get the programms to work (Spotlight, etc), or how to repair them.
    I'm trying to find something wrong in the Protocols I have here, for example
    - the Repair protocol for users from 27.01.2012 ( /Users/Begona/Library/logs/fsck_hfs.log).
    - the Datasystem-Reppairprotocol from 01.02. 14 (/var/log/fsck_hfs.log)
    - the Installationsprotocol from 04.02.14...
    but I am really lost.
    Thank you very much for reading this, help would be high appreciated
    Begoña

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

  • Its urgent  how to use calss file of jar located in lib folder

    how to use calss file of jar located in lib folder.
    i want to use RowSetDynaClass class which is in beanutil jar file which is in my lib folder .if i use that class in my jsp following error is coming.
    Class RowSetDynaClass not found.
    RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
    how to access class in jar file.
    please help

    You have to either refer to the class in its fully quallified name, or import it into the JSP:
    <%
      some.full.packagename.RowSetDynaClass resultSet = new some.full.packagename.RowSetDynaClass(rs,false);
      ...-or-
    <%@ page import="some.full.packagename.RowSetDynaClass" %>
    <%
      RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
      ...As long as the class has public visibility and you have re-started the server/servlet context since you added the JAR.

  • 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 can I get a single jar file with NetBeans?

    How can I get a single jar file with NetBeans?
    When I create the project I get these files:
    dist/lib/libreria1.jar
    dist/lib/libreria2.jar
    dist/software.jar
    The libraries that have been imported to create the project are in separate folders:
    libreria1/libreria1.jar
    libreria2/libreria2.jar
    libreria1, libreria2, dist folders are all located inside the project folder.
    I added the following code to the build.xml:
    <target name="-post-jar">
    <jar jarfile="dist/software.jar">
    <zipfileset src="${dist.jar}" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria1.jar" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria2.jar" excludes="META-INF/*" />
    <manifest>
    <attribute name="Main-Class" value="pacco.classeprincipale"/>
    </manifest>
    </jar>
    </target>
    Of course there is also the project folder:
    src/pacco/classeprincipale.form
    src/pacco/classeprincipale.java
    Can you tell me what is wrong? The error message I get is as follows:
    C:...\build.xml:75: Problem creating jar: archive is not a ZIP archive BUILD FAILED (total time: 2 seconds)

    This is not a NetBeans forum, it is a JDeveloper forum. You might want to try http://forums.netbeans.org/. I also saw your other question - try looking in the New to Java forum: New To Java

  • 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

  • Using external library jar

    Hi everyone,
    I am working on a J2EE 1.3 project. I have a external library jar file at, for example, /myproject/lib. My EAR has to access that external library jar. Moreover, the library jar is not self-contained. It has to use the class that stored in the EAR file.
    I have seen a lot of articles that talking about using Class-Path attribute in the manifest file but that seem not work in my case.
    Could any one have any idea how I can call a external library jar file which is not self-contained under J2EE 1.3 spec? Thank you very much.
    Jacky

    In J2EE 1.3 there was no portable mechanism for extending the appserver-wide classpath of
    a J2EE appserver. However, most appserver's have some way of doing it. You'll need to
    consult the documentation of whatever implementation you're using.
    However, in that case you cannot have code in the appserver classpath with dependencies on
    code in a specific J2EE application. The dependency can only occur in the other direction.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to add external library in class path folder for use in Java call-out?

    Hi,
    I am working with Java callout component in OSB 12c using Jdeveloper.
    Thing is Jar what i am using to perform conversion of json to xml that using external libraries.
    When i have give reference of my project jar to java callout it doen't found external libraries.
    Could you please tell me how to add external libraries in class path folder or How to use to add it through web-logic server ?
    Thanks,
    Pavan

    Hi,
    Thanks, I have solved issue.
    We can add on following path in windows pc:
    C:\Users\your_usename\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\DefaultDomain\lib
    One you add your external lib here then do restart weblogic server instance.
    Now, you have that external lib or jar in use.
    Cool!

Maybe you are looking for