Results 1 to 4 of 4
  1. #1
    alacn's Avatar
    alacn is offline Senior Member
    Join Date
    Jun 2010
    Location
    UK. near London
    Posts
    118
    Rep Power
    0

    Default question about import

    Hi downloaded a buch of jar librabies and put the in the c:/program files...java.../etc folder and then configured netbeans to look at them so my program can access them.

    my question is. Now that ive imported those jar files into my program, ,can i compile my program and send it to someone else and will it work?

    or do i have to include jar libabries with my program and then zip the whole thing and send it?


    im assuming its the second option from expierance.
    Teaching myself java so that i can eventually join the industry! Started in June 2010

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

    Default

    Yup, you have to include the third party libraries. Also, your jar manifest has to define the classpath to include the other jars.

    db

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

    Default

    NetBeans IDE done all for you. First of all add the third party libraries into the project and workout your application. Once the project build you'll get the successful message (if not fix it first of all) and notify that where you can find the build package.

    In the working folder you can find a folder name dist it contain your project JAR file as well as all the other third party libraries in lib folder. So basically you have to distribute that dist folder.

    If you still want to keep them all in a single JAR file then using command prompt you have to create it manually. It's not facilitate by the NetBeans yet.

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

Similar Threads

  1. Import
    By gothrog in forum Java Applets
    Replies: 2
    Last Post: 05-13-2010, 11:16 PM
  2. Can not import jxl.*
    By AnnieDing in forum Java Servlet
    Replies: 3
    Last Post: 01-22-2010, 03:52 PM
  3. import error
    By amarenash23 in forum New To Java
    Replies: 2
    Last Post: 01-15-2010, 11:32 AM
  4. Cant import RowSorter?
    By ProgrammingPup in forum New To Java
    Replies: 3
    Last Post: 11-17-2009, 09:52 PM
  5. How could i import DLL in NetBeans?
    By makpandian in forum NetBeans
    Replies: 0
    Last Post: 02-13-2009, 12:53 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
  •