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

Similar Messages

  • Drag n Drop between JButton and third party Java object

    Hi!
    I want to implement drag n drop(however it is not drag n drop in its real sense) between JButton(s) placed in a JToolBar and third party Java Object i.e. Netbeans Visual Library API's Scene class that is actually like a Canvas in drawing Apps. The Scene class itself is not a JComponent (it extends directly from java.lang.Object), rather we invoke createView method on the Scene object to get a JComponent that could be used any where(probably in a JScrollPane).
    What i want is that when my user drags a JButton to the Scene's view it appears similarly as something is being dragged But in actaul that JButton should'nt be dragged or dropped Rather when user releases the mouse button to drop the item i could use my custom code to do something(actually add a Widget(a graphical item) to the Scene object).
    How could this be achieved..?
    thanks in advance,
    regards.

    The problem with UNIX and more specially with X is thare wasn't common drag'n'drop interface. Now there is XDND (X Drag'n'drop) protocol but it might not be implemented on each X server or may not be used by each X application.
    I don't know if GNOME use XDND and/or if Java implementations for UNIX support that protocol. However you can check some other projects like:
    http://java-gnome.sourceforge.net/
    http://gnome-gcj.sourceforge.net/
    which provide external bindings of gnome libraries to java.

  • How to import  Third party application through SAP in ABAP

    Hello,
    This is regarding importing third party application or non sap application through SAP or through portal...
    is there any way to do the same?
    actually our organization is having one independent application developed on .NET platform. we need to connect that in mY SAP R/3. so pls suggest me some proper way to achieve this one.
    regards,
    jigar
    [email protected]

    You can connect to SAP from a .Net application using the .NET connectors. Please find the help below
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm
    http://www.microsoft-sap.com/overview_sap_connector.html
    http://www.sapgenie.com/interfaces/netconnector.htm
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • Calling third party java page from self sevice page

    Hi,
    Is it possible to call a third party java (html+java) form page (residing in separate web service server) which would take input from standard Oracle apps (OCO) self service OAF page?
    The third party page would validate the fields sent by OAF page and then will provide the results which should be copied back into standard oracle OCO page (self service OAF page)
    From How to open HTML page from OAF it looks like this is possible.
    Can you please confirm ?
    Regards,
    Aneesh

    Technically it will depend more on the third party system involved in the discussion and the way it is integrated. But in the simplest terms, url parameters will always work.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                               

  • Calling third party java page from Oracle form

    Hi,
    Is it possible to call a third party java (html+java) form page (residing in separate web service server) which would take input from standard Oracle form (OCO) page?
    The third party page would validate the fields sent by form page and then will provide the results which should be copied back into standard oracle OCO form page.
    Regards,
    Aneesh

    Don't know if you can do this from Forms PL/SQL, but you should be able to write a stored procedure in the database that does it for you. The stored procedure could use the database package UTL_HTTP to make the HTTP request and receive the response.
    Your custom stored procedure can be called from Forms PL/SQL. If you are caling to a tru web service, you can also look at the UTL_DBWS package which is a bit more high level for calling a web service, than the raw UTL_HTTP package.

  • Import third party designs in an Oracle BPM Process

    Hi,
    Is there currently any capability in the BPM suite to import third party process designs?

    Thanks,
    I was asking more in terms of a general 'import' feature that used to be available earlier (rather than BPA to BPM in particular - which is also probably enabled by XPDL)
    see this: http://blogs.oracle.com/ptslad/2008/12/hi_folks_i_would_like.html
    PS: ARIS is a product in its own standing and not called Oracle BPA Suite now.
    http://www.ids-scheer.com/en/ARIS_ARIS_Platform/3730.html
    BPA Suite is 'based on' ARIS (and always has been, AFAIK)
    http://www.oracle.com/technologies/soa/bpa-suite.html
    Regards,
    Jang-Vijay

  • DST changes impact on third party java applications

    Currently we are running the following versions...
    O\S Windows Server 2003
    JRE 1.4.2_11
    JDK 1.4.2_11
    Should the JRE \ JDK be patched with tzupdater utility in case of running the third party java application?

    You don't have to apply tzupdater tool.
    Already JDK1.4.2.11 have the updated DST Time Zone Entries.
    Ref: http://java.sun.com/developer/technicalArticles/Intl/tzupdatertool.html
    Regards,
    Vel

  • HOW COULD CONNECT FROM SAP SYSTEM TO THIRD PARTY JAVA APPLICATION

    HI expects,
            HOW COULD CONNECT FROM SAP SYSTEM TO THIRD PARTY JAVA or . DET APPLICATION.please provide me some scenarios and documents.please help me.

    Hi,
    In the sender side i.e. in SAP system you can use IDoc/RFC/Proxy to push the data to XI.
    IDoc supports only Async communication and in Sync case performace is good using Proxy.
    In the receiver side you can use Java Proxy to connect to the Java application or you can even bulid a webservice over the Java/.Net application and use SOAP adapter to post data to it.
    Thanks
    SaNv...

  • Integrate SAP BI with third party Java application

    I want to display reports from SAP BI to third party java application. I have found many javadocs, but have not found any document that helps with this problem.

    Not much information provided.
    BO Version?
    Reports in question?
    There are different set of SDKs for different reports. Also there might be changes in the API's between different BO products.
    As suggested by Jawahar, its better if you post your query to SDK forum for better response as it is the dedicated forum for BusinessObjects Java SDK queries.
    Thanks,
    Prithvi

  • Sso with third party java application.

    hi all,
    I want to have single signon for third party java application deployed on websphere 5.0 advanced server .
    I am using SAP EP6.0 SP13 .
    Can anybody help me out.
    thanx in advance.....
    Sarang

    Hi Sarang
    Please refer to the following thread. It should answer your question.
    SSO between SAP EP and JAVA app on WebSphere Application Server 5.1
    Also refer to the following document.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/nw/ibm/how to set up sso between sap enterprise portal and ibm websphere portal using tai.pdf
    Hope that was helpful.
    Warm Regards
    Priya

  • Importing third party XML files into form-based publishing

    Hi,
    I want to import third party XML files into form-based publishing. My problem is that when I open the files, they are presented as normal XML files.
    The 'type' property is not set to "form-based publishing". That's the reason no form is linked to the XML file.
    Is there a way to change the value of this 'type' property? Then I can set it to "form-based publishing".
    Message was edited by: E. van der Palen

    Hi,
       You should take into account two things:
    1. XML Repository filter
    System Administration-System Configuration-KM-CM-Repository Filters-choose XML Forms Repository Filter
    edit it and add your repository.
    After that you have to restart it.
    2. Resource Type.
    You should modify cm_resourcetype property to set form-based publishing.
    You could edit this xml file using form builder and then set this parameter.
    Patricio.

  • Developing Application for third-party Java API (jar) libraries

    I need some of your inputs on architecting a web based solution to invoke Vantive java API using SAP Netweaver Technology. The API provides methods to connect, insert, update, fetch data from Vantive system using java classes. Pl. let me know which would be best way (webdynpro/ j2ee/java) to create & run web based forms to connect, insert and update data in Vantive using these Java APIs.

    I think there is your choice only that based on your experience with web technologies (in case of integration with portal as I understood) but the nominee with the best integration capabilities is Dynpro. Of course you can simply use standard JEE techniques (see the official JSR for official technology and release notes of official restrictions by SAP implementation). Third party integrations are available in both choices: Dynpro or not. In general your choice is better to be with an appropriate estimation, isn't it? Or try to define concretely criteria of such integration.

  • *URGENT* importing third party package into Jdev project

    hi,
    our company has bought a thrid party package instead of developing one to speed up the project pace. Some how we cannot import the package into our project environment,
    this is what we do with the package.
    set the class path to where the *.jar files are, for example: C:\AccBank\beta\creditcheck.jar
    please note that the "C:\AccBank\beta\" is where the project file locates.
    and follow is the import statement
    import thirdparty.package1.*;
    please tell us what did we do wrong, if the case in question is not clear, please tell us the steps we need to do to import and use a third party package with JDev.
    Also, please tell me the different purpose between the directory :
    PROJECTFILES and CLASSFILES under the main project directory
    Thank you very much for your time and your help
    Augustina
    null

    Hello,
    I'm not sure about what you mean,
    but in order to use a given package within JDevelopper, you should:
    - select project/project properties,
    - find the libraries tab
    - click "add", then "new"
    - click "class path"
    - click "add ZIP/JAR" and add the various jar files you want to include
    Note: if the included libraries contain subpackages of packages like javax, and you want to deploy your project (as EJB for instance) you will have to edit the deployment profiles in order to add the 3rd party libraries, otherwise, these subpackages won't be deployed (by default, packages suvh as java.lang, javax etc.. are not excluded from the deployment).
    about the PROJECTFILES and CLASSFILES items, they refer to the directories in which your project's source code (PROJECTFILES) and compiled classes (CLASSFILES) are stored
    Hope this helps, Remi
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Augustina:
    hi,
    our company has bought a thrid party package instead of developing one to speed up the project pace. Some how we cannot import the package into our project environment,
    this is what we do with the package.
    set the class path to where the *.jar files are, for example: C:\AccBank\beta\creditcheck.jar
    please note that the "C:\AccBank\beta\" is where the project file locates.
    and follow is the import statement
    import thirdparty.package1.*;
    please tell us what did we do wrong, if the case in question is not clear, please tell us the steps we need to do to import and use a third party package with JDev.
    Also, please tell me the different purpose between the directory :
    PROJECTFILES and CLASSFILES under the main project directory
    Thank you very much for your time and your help
    Augustina <HR></BLOCKQUOTE>
    null

  • Compiling problem when importing third-party package

    Hi,
    I have a question about compiling a java application program. I tried to use a free package from third-party, say "abc.jar". I added it to my classpath by setting Win2000 CLASSPATH environmental variable.
    When I compile the program, it complained that it can not find the classes inside the abc.jar file.
    My program is located at: C:\test\Test.java. The abc.jar file is located at: C:\libraries\abc.jar. It is already set in classpath.
    Here is the structure of Test.java:
    import com.abc.def.ghi.PLOT;
    import com.abc.def.ghi.GRAPH;
    class Test {
    //main method using PLOT and GRAPH classes from abc.jar
    Suppose now I am in C:\test\ directory, this does not work.
    javac Test.java
    Then still in C:\test\ directory,I tried:
    javac -classpath ".;c:\libraries\abc.jar" Test.java
    Still it does not work, it complains that it can not resolve symbol "PLOT","GRAPH".
    How to solve this problem?
    Thanks.

    I'd put that JAR file in the same directory your Test.java file is in for now. You should keep it close to the Java files that use it in any case, IMO.
    Ditch that system CLASSPATH. (I don't have one.) You should always set the CLASSPATH as you need it when you compile and run.
    The statement you need to compile is:
    javac -classpath .;abc.jar Test.javaIf that works, you run by typing:
    java -classpath .;abc.jar TestThis assumes no package statement in Test.java.
    Are you sure that JAR contains two files named PLOT.class and GRAPH.class, both with paths com.abc.def.ghi? If not, the class loader won't find them in the JAR.
    It'd be better if you cut & pasted the message verbatim. If you've quoted it properly, the error you got sure is weird.
    That message means you've got a CLASSPATH problem. It's the stumbling block of every newbie. Don't rest until you figure out what you've done wrong. - MOD

  • *urgent* importing third party API

    hi,
    To import the third party *.jar we bought,
    I click on
    Project->Project Properties->library->add->new
    Then I give the APi a name in a the box
    Then I click on ... Classpath ->add ZIP/JAR and browse to choose the Jar file to be added to our project.
    but then when we expilictely import the
    package it is redded highlight
    import abc.*;
    this line is highlighted and the error message say
    Error reading directory D:\thirdparty\JAAdapter.jar bad entry
    did I do anything wrong...please help

    Hi,
    This sounds like your jar file might be corrupt.
    Try the following: rename the jar file to JAAdapter.zip and try opening it with a zip utility (e.g. WinZip). If the zip utility reports errors, the Jar file is corrupt.

Maybe you are looking for

  • How do I make hyperlinks open in new window?

    Hi, I'm using Acrobat X Pro.  I have a pdf uploaded to a website, and within that pdf are two hyperlinks to other websites.  Currently, if I click on the links, they open in the same window.  How do I make the hyperlinks open in a new window by defau

  • Infomix 9.7.4 to Oracle 10g

    Looking for a migration workbench to move from Informix 9.7.4 to Oracle 10g database. Is there one available?

  • OSX 10.8 - Finder Quitting in a Constant Loop

    Finder is repeatedly crashing and relaunching every few seconds and this is on a constant loop...literally every 3-4 seconds. There is a popup that appears every once in a while and then disappears. The popup says: The last time you opened Finder, it

  • Database connection status indicator

    I want to put something on the front panel of my program that will show the database connection status. I'm thinking of asking to list tables (it doesn't have to be displayed), if the connection is no longer good, it will show error. I tried it and I

  • TS3297 error 8003 iTunes download

    I downloaded some music on my iPad which loaded successfully but only half the album appears in iTunes on my iMac.  Whenever I try and download I keep getting the same error message which is that it has stopped (err = 8003).  I've checked my access t