Results 1 to 4 of 4
  1. #1
    aldm is offline Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0

    Default how can downloaded package be imported in java

    Hi,

    I'm new to java. I need BasicDataSource class in my application.
    When I try to import this, it gave me an error that packege does not exist.
    I downloaded whole org.apache.commons package , but how can I
    import it in program? Where should I copy this package to import it in program?
    I'm using Net Beans IDE.

    Thanks in advance,

    Amer

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Have you told the IDE about the location of the jar file?

    In NetBeans if you right click the icon in the "Project" pane and select "Properties" you get a dialog box. Select "Libraries" on the left hand side and use one of the buttons on the right as appropriate. (add project, add library, add jar etc)

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,874
    Rep Power
    8

    Default

    It's important that you understand what's going on "under the hood" without the IDE. See this: Setting the class path

    Many people would recommend that until you understand the little stuff like this, you shouldn't be using an IDE at all.

  4. #4
    aldm is offline Member
    Join Date
    Oct 2010
    Posts
    9
    Rep Power
    0

    Default

    I solved a problem by importing one jar in NetBeand IDE. Thank you both (for answer and
    for this article about setting class path).

Similar Threads

  1. show the comment in the imported class
    By javastuden in forum New To Java
    Replies: 5
    Last Post: 08-31-2010, 10:37 AM
  2. Downloaded images aren't viewable
    By pietertje in forum New To Java
    Replies: 12
    Last Post: 07-05-2010, 02:56 PM
  3. Replies: 7
    Last Post: 11-09-2009, 07:51 AM
  4. Is the imported package foo beeing used in the programm
    By cthulhufhtagn in forum New To Java
    Replies: 3
    Last Post: 11-01-2009, 04:27 PM
  5. Implementing a downloaded JAR file?
    By johntveg in forum New To Java
    Replies: 2
    Last Post: 06-27-2009, 05:51 AM

Posting Permissions

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