Results 1 to 4 of 4
  1. #1
    riggster is offline Member
    Join Date
    Feb 2012
    Posts
    1
    Rep Power
    0

    Default installing third party api

    I downloaded a third party api along with a sample application from interactive brokers. To run the sample code, they say to open my ide (netbeans 7.1), create a new project, open project properties, and add two source package folders, click ok, and run the project. When I do this I can successfully run the sample code they provide. By the way, one folder is com/ib/client, which contains around 20 text files with .java extensions, which are the API files. The other folder is JavaTestClientApp, which has the source code for the sample app (all files in this folder are also text files with .java extensions).

    My question is how to use just the api in a different project where I write my own app. If I try to open a new project, go to project properties, and add the folder with the api the same way I did before, I get the following error: The following folders that you selected are already used in this or another project. A package folder can only be used in one project in one package folder list (source packages or test packages). These folders can not be added into the project.

    By the way, I am using java 1.7.0_02. Any advice would be greatly appreciated. Thanks.

    Riggster

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: installing third party api

    Moved from New to Java

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,843
    Rep Power
    19

    Default Re: installing third party api

    Netbeans should have generated a dist folder for the 3rd party api, inside which should be the jar file containing the compiled code.
    Copy that jar file to a lib folder in your new app and add that lib folder (or just the jar file, it's up to you) onto the build path.

    If there isn't a dist folder then you'll need to find out how to get Netbeans to generate the jar file. Can't help there as I haven't got Netbeans on this machine.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: installing third party api

    Any advice would be greatly appreciated.
    NetBeans has an extensive help system, contextually linked to any open dialog. Open the project properties and select the Libraries node, then click the Help button -- and next time round, check the help files available on your own computer before posting to a forum. They were authored for a purpose.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. How to use 3rd party classes in Eclipse
    By hahncj55408 in forum New To Java
    Replies: 2
    Last Post: 12-02-2011, 08:40 AM
  2. Birthday Party Code
    By tonyfingures in forum New To Java
    Replies: 10
    Last Post: 09-16-2010, 03:24 AM
  3. Third party packages
    By logicbug in forum New To Java
    Replies: 0
    Last Post: 03-23-2009, 03:05 PM
  4. JSP Unable to access the third party libraries
    By VJSFDeveloper in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 09-08-2008, 04:57 PM
  5. Need to hook up my jsp code to third party vendor
    By priya123 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-28-2008, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •