Results 1 to 9 of 9

Thread: kestion

  1. #1
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default kestion

    Hi guys ,i have a problem in how to include certain java files in my application's classpath ,the files has to be put in com.folderx..... but when I put them in the application folder ,i can't import in the application main class,
    import com.folderx...... gives me an error (folder doesn't exist) ,plz can anybody help ??

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    i'm working under net beans ide, it's an image classification tool, I have to include some jar files in my class path ,how to do this ?

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    Set your classpath.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    I'm not clear what you are asking here. Adding a jar file to a class path is wired me at all. If I'm correct what you want to do is, use a jar file in your project, right? That's adding external jar files to the project.

    To include a jar file in NetBeans, go to the project properties by right clicking on the project. Then click on the libraries menu. There you have an option to add a jar file on to your project.

  6. #6
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    alreadyy done, but still the same problem,while setting the classpath , which type of variables systems i should put it under,(user or system variable ),thx

  7. #7
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    ok i'll try it.

  8. #8
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    Well, what i want to know is how to set the class path.

  9. #9
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    From the command line (without the -jar option), use the -cp option. Running from a jarfile (and/or with the -jar option), configure the manifest file properly. From an IDE, add the item as a library to the project. In a web container / application server add it to WEB-INF/lib.

Posting Permissions

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