Third-party libraries in a JSC team project

We're using Sun Java Studio Creator 2 Update 1 (JSC) for the project I'm working on. This project uses a few third-party libraries (jar files). Up until 2 weeks ago I was the lone member of the project team and all was fine. Then we added another team member and encountered an issue with the 3rd-party jars. In particular, since I had setup the 3rd-party libraries using the "Library Manager" facility, I had no problems with building and deploying the app, but when my team member got the code from the version control system, he could not compile due to an error saying something like "library not found". I'm looking for a way to setup the 3rd-party libraries for our project such that those jars are found during compilation (and included in the WAR file) while at the same time new developers do not have to use the "Library Manager" to configure all the libraries on their JSC install. I tried adding the jars to the project's "lib" directory, but that did not work unless I explicitly listed them in the compile path (using "Project Properties") and this used a hard-coded path to the jars. I would rather not require that every project team member use the exact same disk path to our project so I do not like this approach either.
Any suggestions?

As a best-practice for creating projects for version control, the jar files should be added as jars and not in a library unless the library points to jars that are at a common location on the network. You can add a directory to your project from the "files" tab called something like "projectlibs". Then add the 3rd party jar files here. When you add the jar to the project, make sure you check the "package" column which tells Creator to package the jar with the deployment.
Cheers!
-David

Similar Messages

  • Confusion about third-party-libraries in different versions in CE 71.

    Hi
    After some research on the use of different versions of third-party-libraries in SAP netweaver CE 7.1, I am actually quite confused and would be happy if someone could shed a light on that subject....
    1. Is there a way to tell netweaver CE 7.1 to use a library in my WEB-INFlib-folder by simple configuration?
    E.g. we would like to use a third-party-lib in a newer version than the one which is loaded by CE 7.1. Many application server provide a simple configuration option (e.g inside META-INFapplication.xml) where the web as can be forced to use the library inside WEB-INFlib for this application.
    2.Is the concept of "heavy loading" described in a blog by Georgi Danov(Using Hibernate in SAP NetWeaver Composition Environment) the answer to question 1.?
    Does it also work for other third-party-libraries than hibernate? Does it work at all?
    3. In the blog mentioned in question 2, Mr. Danov is talking about "shared libraries". Does this mean, that I have to forget everything about "bundled" and "standard" libraries explained in help.sap.com/CE, if I want to create a heavy loader?
    He is referencing another blog (Applications and shared libraries) which is two years old? Can I still apply the information there to CE?
    4. Are "Bundled libraries" applicable when using different versions of third-party-libraries in CE 7.1?
    In "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:
    "Bundled libraries: These provide resources only to a single enterprise application, and are packed inside the application's EAR file."
    =>As I want to provide the lib only to my enterprise application, I will probably have to create a bundled library, right? Does this also work if netweaver CE 7.1 uses a different version of the same library?
    5. Do I need Netweaver Developer Studio for creating "bundled" libraries?
    Or can I copy the binaries in the WEB-INFlib-folder of my application, deploy it and use it?
    6. Is configuration of application-j2ee-engine.xml the right place to reference a third-party-library in a specific version which exists in WEB-INF/lib-folder in my application even if it exists also in another version on netweaver?
    => In the document "Troubleshooting: Finding Missing Parent-Child Relations" it says: "To implement the chain of parent-child relations in the deployment descriptor of the component, use either application-j2ee-engine.xml (for applications) or provider.xml (for libraries and services)."
    => "Creating standard libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f447a8d62b0484e10000000a155369/frameset.htm9 tells me, that I have to configure the file application-j2ee-engine.xml, too.
    => But in "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:
    "Standard libraries: These provide resources to all enterprise applications deployed on the server. They are packed in EAR files like the enterprise applications."
    => Does this mean, that I have to force Netweaver CE 7.1 to use a higher version of a certain third-party-library? Does this even work? Do all applications deployed on Netweaver 7.1 have to use this library in the higher version?
    It is really confusing to read through the documentation!!! Sorry for that avalanche of questions, but I really hope it will make the issue of using libraries (especially if they exist in different versions on the CE 7.1) a little clearer!
    Best regards
    Bettina

    Hi Bettina,
    I'll try to answer your questions:
    >
    > Hi
    >
    > After some research on the use of different versions of third-party-libraries in SAP netweaver CE 7.1, I am actually quite confused and would be happy if someone could shed a light on that subject....
    >
    > 1. Is there a way to tell netweaver CE 7.1 to use a library in my WEB-INFlib-folder by simple configuration?
    >
    > E.g. we would like to use a third-party-lib in a newer version than the one which is loaded by CE 7.1. Many application server provide a simple configuration option (e.g inside META-INFapplication.xml) where the web as can be forced to use the library inside WEB-INFlib for this application.
    >
    First of all, the appropriate docs are here: [http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm|http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm].
    Basically what you do is define a lib project in the studio and deploy it do the server. This may be less comfortable then just configuring manually, therefore it work better in larger environments because the server checks that libs are available in all running instances - which it could not do if you manipulate diretories manually  (an approach you should never attempt in any SAP envrionment)
    > 2.Is the concept of "heavy loading" described in a blog by Georgi Danov(Using Hibernate in SAP NetWeaver Composition Environment) the answer to question 1.?
    >
    > Does it also work for other third-party-libraries than hibernate? Does it work at all?
    >
    If Georgi describes it, I hope so, as he is one of our developers who knows best.
    > 3. In the blog mentioned in question 2, Mr. Danov is talking about "shared libraries". Does this mean, that I have to forget everything about "bundled" and "standard" libraries explained in help.sap.com/CE, if I want to create a heavy loader?
    >
    "shared" are all of theses libs, as otherwise they would be specific to an application.
    > He is referencing another blog (Applications and shared libraries) which is two years old? Can I still apply the information there to CE?
    >
    This was about anearly version of CE and even Georgi updated the blog this year to talk about slight differences. So yes, this still applies.
    > 4. Are "Bundled libraries" applicable when using different versions of third-party-libraries in CE 7.1?
    >
    > In "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:
    >
    > "Bundled libraries: These provide resources only to a single enterprise application, and are packed inside the application's EAR file."
    >
    > =>As I want to provide the lib only to my enterprise application, I will probably have to create a bundled library, right? Does this also work if netweaver CE 7.1 uses a different version of the same library?
    >
    That depends... Your application uses it's own classloader which means it should only use your libs in case there is another version available on the server. But if you're trying to deploy a lib that is used by a service of the server (int that case loaded by the server not your classloader!) I'm not so sure.
    > 5. Do I need Netweaver Developer Studio for creating "bundled" libraries?
    >
    > Or can I copy the binaries in the WEB-INFlib-folder of my application, deploy it and use it?
    >
    You need the Studio. No way around that. [Edit:] Sorry, misunderstood you here: I thought you want to copy something into the deployed directory on the server! - Of course, any deployment method would do it and though copying binaries seems to be valid. However,  I'm checking this currently with development in detail.
    > 6. Is configuration of application-j2ee-engine.xml the right place to reference a third-party-library in a specific version which exists in WEB-INF/lib-folder in my application even if it exists also in another version on netweaver?
    >
    > => In the document "Troubleshooting: Finding Missing Parent-Child Relations" it says: "To implement the chain of parent-child relations in the deployment descriptor of the component, use either application-j2ee-engine.xml (for applications) or provider.xml (for libraries and services)."
    >
    > => "Creating standard libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f447a8d62b0484e10000000a155369/frameset.htm9 tells me, that I have to configure the file application-j2ee-engine.xml, too.
    >
    > => But in "Working with libraries" (http://help.sap.com/saphelp_nwce10/helpdata/en/44/f4e00e56ec0486e10000000a155369/frameset.htm) it says:
    >
    > "Standard libraries: These provide resources to all enterprise applications deployed on the server. They are packed in EAR files like the enterprise applications."
    >
    > => Does this mean, that I have to force Netweaver CE 7.1 to use a higher version of a certain third-party-library? Does this even work? Do all applications deployed on Netweaver 7.1 have to use this library in the higher version?
    >
    >
    >
    > It is really confusing to read through the documentation!!! Sorry for that avalanche of questions, but I really hope it will make the issue of using libraries (especially if they exist in different versions on the CE 7.1) a little clearer!
    >
    > Best regards
    > Bettina
    Could you tell me what you're trying to deploy? I'll try to get Georgi on this....
    Regards,
    Benny
    Edited by: Benny Schaich-Lebek on Nov 5, 2008 1:40 PM

  • No of classes, Methods, Lines of codes, DLL's used and Third Party Libraries details identifying tools

    We have started a project to migrate 100+ Web Applications developed using legacy Microsoft technologies to latest .Net 4.5 Framework.
    The following are the planned migration approach
    Classic Asp à                                                   
    Asp.Net 1.1 Framework à Asp.Net 4.5 Framework
    Asp.Net 2.0, 3.5, 4.0 Framework à         Asp.Net 4.5 Framework (Direct Migration)
    Asp.Net 2.0, 3.5, 4.0 Framework à         Asp.Net 4.5 Framework (Application Rewrite
    using MVC/Entity Framework)
    VB 6 (COM/DCOM) à                                  
    C# .Net 4.5 (Web Services)
    We have to analyze 100+ applications to categorize them as Simple/Medium/Complex conversions for planning the timeline for completing the migration activities.
    Analysis includes identifying the following details - No of classes, Methods, Lines of codes, DLL’s used and Third Party Libraries  details
    for 100+ Microsoft applications.
    Could you please let me know do we have any effective tool to identify above mentioned details?

    This forum is for Microsoft Project Server, an EPM tool. You will need to find a more suitable forum for your question.
    Good Luck with the conversion!
    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

  • Third party libraries for hibernate(jar files)

    Hi I am new in hibernate.I follow some steps of hibernate tutorial from
    http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html
    In chapter-1 1.2.3. Hibernate configuration when i try
    java -classpath ../lib/hsqldb.jar org.hsqldb.Server
    database should be started but it,s not
    most probably reason is also include third party libraries
    I try all but still not getting success.
    In command prompt I get ::
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\shobhitsingh>cd\
    C:\>cd hibernatet*
    C:\hibernateTutorial>java -classpath ../lib/hsqldb.jar org.hsqldb.Server
    Exception in thread "main" java.lang.NoClassDefFoundError: org/hsqldb/Server
    C:\hibernateTutorial>pl guide
    Regards
    -S.Singh

    I'm sorry.I used classpath in wrong manner.I got where I'm wrong.
    Regards
    -S.Singh

  • Login module access to third-party libraries?

    G'day,
    I have a simple login module that is currently deployed in Netweaver 2004s. It is callable by both Netweaver AS and Netweaver Portal, and was implemented using Netweaver Developer Studio.
    I would like to have this login module use third-party libraries, but I am not sure of the best approach to take here.
    Do I just drop the third-party libraries into the jre/lib/endorsed directory of the JDK, or is there a better way of putting the third-party libraries onto the classpath?
    When I edit the server/provider.xml file of the login module library in Developer Studio, it only allows me to make references to jar files that currently exist in the workspace. So adding references to external jar files does not seem to be supported here.
    Is there a proper place to drop third-party jar files, so that they can be used by my login module?
    --Geoff

    Hi,
       There are different ways. as you said You can either drop it in jre/lib folder or a clsspath setting will do.
    But some times the server will not be able to catch up those libs so You can set the path to these libs in config tool. This will ensure the server will take these libs for sure.
    If you have set the classpath NWDS will take this reference

  • Using third party libraries

    Hi,
    I have an oc4j application which refers to certain third party libraries ( jar files).
    Which xml files should I be making an entry in, for the application to refer to these jar files?
    Regards,
    Rishikesh R.

    The <library-directory> element of the application.xml file specifies either a relative or absolute path or URL to a directory or a JAR or ZIP archive to add as a library path for this OC4J instance. Directories are scanned for archives to include at OC4J startup.
    -Frances

  • About Third-party libraries..

    Hello,
    1) Is there any tutorial that shows how to use third-party jar files in our projects, step by step? I tried :
    *Tools/Manage Libraries, then created new in "User" directory, Selected my jar files in class path then used Tools/Project Properties/Libraries/Add Library and selected the one that i added in previous step.
    However when i type
    import packagename.* it marks it as GRAY and does not do anything.. ?
    2) If i add, does it encrypt and compress my third-party jar file in my Main jar file? Or do i need to make it read from external directory by my code?
    If it does not ecrypt, how can i avoid people using the library that i used in my project when i give them my software?
    Thanks..

    hi GlenX
    Could it be that your JAR file you refer to in (1) contains your "library JAR" as a JAR file?
    It looks like using a "Library File Group" in a "JAR Deployment Profile" includes the "library JARs" as JAR file in the new JAR file created by the profile. It is possible to add the contents of "library JARs" using a "Dependency Analysis File Group" in a "JAR Deployment Profile".
    see http://verveja.footsteps.be/~verveja/files/oracle/JarStuffThread615655-v0.01.zip
    In JarStuffThread615655-v0.01.zip I have included two applications, "Thread615655MyToolApp" and "Thread615655MyClientApp" with in each one project (to avoid confusion about project dependencies).
    The MyClient.jpr project has a "MyTool project library" configured, referring to "MyTool.jar".
    So, you could try this scenario ...
    (1) open Thread615655MyToolApp.jws in JDeveloper
    (2) select "Deploy to JAR file" on MyToolDeploymentProfile.deploy
    (3) open Thread615655MyClientApp.jws in JDeveloper
    (4) select "Deploy to JAR file" on MyClientDeploymentProfile.deploy
    (5) double-click the "MyClient\deploy\MyClient.jar", and see the "vSomeMyToolValue = some MyTool value" shown on the panel in the frame.
    regards
    Jan Vervecken

  • Integrate third party libraries with JBuilder 2005

    Hi,
    Does any body know how to integrate any third party APIs with JBuilder 2005. It would be of great help if anybody of you could jot down the steps to integrate third party APIs with JBuilder.I've got to use the JDIC API(https://jdic.dev.java.net) and the PDFBox APIs(www.pdfbox.org) with in JBuilder.
    Thanks & Regards,
    DT

    Yep got it. Shoud have refered the docs before asking this question. I used the following menu item to add a third party .jar file
    Project->Project Properties: select the Paths option and add the required jar file by selecting the "Required Libraries" tab.
    Regards,
    DT

  • Using old third party libraries

    I am trying to compile several programs and the programs need to use old libraries that I cannot re-compile because they belong to a third party vendor. Is there any way to get symbols resolved using older libraries that were probably built using Sun's 4.0 compiler ?

    For full details, read the C++ MIgration Guide that comes with the compiler, and which is also available at docs.sun.com.
    If the libraries were built using Sun C++ 4.2, you can build new code using the -compat=4 option and it will be binary compatible with the libraries. You will be restricted to ARM (1990) style C++, and will not be able to use modern C++ features in your new code.
    If the libraries were built using Sun C++ 4.0 or 4.1, you might have some compatibility problems.
    You should get the vendor to re-build the libraries using a recent Sun C++ compiler, or find replacements for the libraries. You can't rely on old-style C++ forever.

  • Compiling third party libraries

    Hello,
    I have included a third party library in my project and have placed it in the lib folder of the project directory. When I build the project through the WTK2.0 the jar size includes all the classes in the library, whereas I just use a few of them only. My question is, how do I make the jar file small ? Can't the WTK2.0 automatically select only the classes I use from the library and pack them up in the jar ? Can the obfuscator do the same? if yes, which one ? Proguard/Retroguard.
    I would really appreciate if anyone can give me some more pointers regarding this issue.
    Regards,
    kiks

    Obfuscators get rid of any code that is never accessed. If that doesn't work you can always unpack the jar, take only the needed classes and repack it.
    shmoove

  • Using Third Party Libraries in J2ME IDEs

    How easy is it to use functions from a third party library in J2ME IDEs? Is it usually just a matter of including the library or is more configuration involved?
    Thanks for your time.

    I had this problem a year ago. I'm surprised it hasn't been fixed yet. Here is what I had to do to create an external library DC for my third-party apis.
    - Create a java library DC.
    - Switch to resource view
    - Edit .dcdef to change component type to Library
    - Edit .project file, Delete Nature Java line
    - Restart IDE so that it shows as Library DC instead of Java
    - Switch to Resource View
    - Get all the third-party jar files into folder structure com
    - Copy and past the root folder into src (this would bring all class files)
    - Add build.vm in cfg folder (content #BuildSecondaryLibrary())
    - Add Public Part for API Reference (the IDE should allow to add the all the classes from the selected folder. You probably will have to select each classes manually. Very problematic when you have a lot of classes from your third-party provider)
    - Build and Deploy
    - Now go to your other project where you want to refer this external library DC
    - Add to the external library DC as used DC (select build and deploy options)
    - Build and Deploy
    - Make sure provider.xml in the sda file has reference to dfc lib (for some reasons the IDE doesn't want to reference the external library DC and just skip it despite the fact that you've selected build and deploy options when you referenced the used DC)
    - If not extract the SDA file, Edit the provider.xml, and zip back. then Build and Deploy

  • Swing with third party libraries

    I know that within the Java SDK there is an extensive ability to create 2D and 3D graphics for use in an application. However, what is the situation with 3rd part libraries (e.g. specifically looking at Open Inventor from numerical algorithms group). Is it easy to use these libraries within swing? For instance, from my limited knowledge so far I would envisgae creating some sort of 'pane' in which I could then simply paint a chart/graph that I'd created with the NAG library. Is it this easy or much more involved? To what extent are libraries compatible? As you can see I at a fairly basic level here so any help much appreciated.
    Cheers

    Close this thread as it makes little sense.

  • Default installed third party libraries

    Hello everybody,
    I am wondering is there any link where I can find the libraries installed by default when MacOs gets installed. Actually I am interested to know if on every MacOs Tiger and above openssl and curl are installed by default.
    Thank you and sorry if a similar subject was already discussed - I did not find anything similar yet.

    Thank you for your answer and warm welcome. I have clean images without development support for Mac-Os 10.4, 10.5 and 10.6 and yes the libraries for openssl and curl are already installed. I do prefer to not link statically with this two libraries because in time some important vulnerabilities might get fixed and it is safer to link with them dynamically. This is why I would like to find something which says Mac-Os official install openssl and curl. Anyway from everything I found it looks 99.99% sure that openssl and curl are already installed on Mac-OS at least beginning with Tiger.

  • Class conflicts with third-party libraries on j2ee engine

    Hi,
    I am deploying a repository manager into EP. In my repository I referenced javax.xml.namespace.QName, which conflicts with the one declared in jaxrpc.jar in j2ee/cluster/server0/bin/ext/webservices_lib.
    I am not very clear about how NW j2ee engine loads classes, but it seems that it loads classes in j2ee/cluster/server0/bin/ext/webservices_lib first. As a result, I got a class confliction error:
    java.lang.NoSuchMethodError: javax.xml.namespace.QName.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    If I remove QName.class from the jar in webservices_lib, it works fine, but this not the right way. I have read Note 990854, but not clear about how to do. Could anyone give any help?
    Thanks,
    Ray

    Close this thread as it makes little sense.

  • Importing third-party java libraries

    I have just downloaded jakarta httpclient and am trying to get it to work with a program I am writing. Are there instructions somewhere on importing third-party libraries? I've searched these forums, the tutorials, and even google and haven't found any. Or can someone just tell me how to do it?
    Basically I have a folder with a list of java files. I run javac program.java to compile and then java program. The one thing I have seen in these forums is about setting the classpath, but no specifics on what to set it to. Basically I have a folder with the source called java. The only subfolder there is org, the next subfolder is apache, next is commons, then httpcliet, and then all the actual java files with a few other folders with the java files in them. It gives examples in the folder src which is the parent of java. In src there is a folder called examples. The relevent import statements are:
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
    import org.apache.commons.httpclient.methods.GetMethod;These are all valid files under the folder system, yet it gives me the error : package org.apache.commons.httpclient does not exist for the first 2 and package org.apache.commons.httpclient.methods does not exist.
    There are also errors resulting from it not recognizing the import statements. Can someone help me please?

    I had a choice between source and binary, if I
    download the binary, should I put the jar file inthe
    folder with the rest of my *.java files?You can, but I'd advise against it because it gets
    messy and confusing.
    Or do I have
    to put the whole folder (with the API, liscense,
    readme, etc. in it) in the same folder as MY codeor
    do I just need the .jar file? You just need the jar file. Don't unpack the jar
    file; the standard java libraries know how to deal
    with a jar file just fine.
    More-or-less standard practice would be to create a
    directory hierarchy like this:
    project_name/
    project_name/lib/
    project_name/src/
    project_name/classes/
    Put the jar files in project_name/lib. Put your java
    source files (the ones that you're creating) into
    src/, and when you compile, put the compiled class
    files into classes/ (use the -d option to javac to do
    that). When you compile and run, include both the
    classes/ directory and the jar files (note: NOT the
    lib/ directory, specify the individual .jar files) in
    the classpath.So do I need the absolute path of the .jar file? If I were to put it in the same folder as my source could I just specify as
    javac -classpath whateverjar.jar MyFile.java
    or do I have to do javac -classpath C:\my folder\my other folder\etc\projectName\lib\whateverjar.jar MyFile.java?
    Thanks

Maybe you are looking for

  • Why i-tunes not working with the windows 8.1?

    i have windows 8.1 in my laptop,but i-tunes not working with it.when i connect my iphone with my laptop its not shown in itunes. can you please help me?

  • Problem copying data from postgres to Oracle via dg4odbc

    Hi All, I am trying to migrate data from a postgres moodle database to an oracle one.  I have set up dg4odbc and it is mainly working, except when I try to insert select for some tables only. Eg. SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 12

  • Update Customer number for an equipment

    Dear All, Can we update customer number for an equipment using any BAPI? Please Check T-Code IE02, Other tab. Thanks Amit

  • RE: C Wrappering GetScope error follow-up

    How you solve the problem probably has a lot to do with what your C library is actually trying to do. The C wrappering I've done has all involved cases where I could get away with not needing to maintain any data bewteen method calls, and hence from

  • How to invoke BPMN processes in another project in JDeveloper?

    I have imported two BPMN diagrams from the Oracle BPA to JDeveloper. After importing I ended up with two projects each containing the first and second diagram. The problem now is in the final product, the user should be able to go through the tasks a