Results 1 to 2 of 2
  1. #1
    Josep_16's Avatar
    Josep_16 is offline Member
    Join Date
    Mar 2011
    Posts
    40
    Rep Power
    0

    Default How to use libraries?

    Hi! I was looking for a class that could create a polygon with Double coordinates, not with int ones. Searching with google, I found two classes, (Polygon2D (Apache Batik Javadoc)) and (Polygon2D).
    As I'm new to Java (I'm just making my first program), I really don't know how to import that kind of classes, which are not from the Java Platform.
    Could you please tell me how to import them? Hope it's as easy as importing a Java Platform one. Thanks! ;)

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,563
    Rep Power
    23

    Default Re: How to use libraries?

    You need to put the jar file with the class definitions on the classpath for the javac and the java commands. If you are using an IDE you'll need to read its doc to see how to do it.

    Add import statements to your source as needed.

  3. #3
    Josep_16's Avatar
    Josep_16 is offline Member
    Join Date
    Mar 2011
    Posts
    40
    Rep Power
    0

    Default Re: How to use libraries?

    Quote Originally Posted by Norm View Post
    You need to put the jar file with the class definitions on the classpath for the javac and the java commands. If you are using an IDE you'll need to read its doc to see how to do it.

    Add import statements to your source as needed.
    I downloaded NetBeans and it made it much easier. Now TextPad looks like obsolete for me :P
    Last edited by Josep_16; 09-07-2011 at 10:01 AM.

Similar Threads

  1. Using libraries that others dont have(j3d)
    By scorpion9 in forum Advanced Java
    Replies: 7
    Last Post: 02-19-2010, 11:24 AM
  2. Replies: 1
    Last Post: 11-04-2009, 02:45 AM
  3. Not Copying Libraries!?!
    By Atriamax in forum NetBeans
    Replies: 0
    Last Post: 10-13-2009, 07:56 AM
  4. How to load new libraries
    By Manfizy in forum NetBeans
    Replies: 2
    Last Post: 02-11-2009, 06:55 AM
  5. Reading Libraries.
    By leiferouis in forum New To Java
    Replies: 4
    Last Post: 02-07-2009, 08:34 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
  •