Results 1 to 6 of 6
  1. #1
    libish is offline Member
    Join Date
    Aug 2008
    Posts
    1
    Rep Power
    0

    Default can any one help?? how to import library

    i got a package.
    i wanna install this package some where and i wanna import this package as library. is that possble..
    or can any one say how to install a package as library.:)

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,756
    Rep Power
    25

    Default

    It all depends on what system is to look at your library. What software is it to be imported into? What form is it in? A jar file?
    Some require the jar file be placed in a folder. Others that the jar file be on the classpath.

  3. #3
    mtv134 is offline Member
    Join Date
    Aug 2008
    Posts
    22
    Rep Power
    0

    Default

    you need to export the package as a jar file using the export utility of the IDE you are using
    or
    use java -jar command
    jar cf jar-file input-file(s)
    visit http://www.thejavacode.com
    Muhammad Safwat

  4. #4
    Rooneyz is offline Member
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    25
    Rep Power
    0

    Default

    It's also depending on what IDE you are currently using for your project (if you're using one at all). On netbeans to import a JAR do the following:
    -right click on your project (in project's frame)
    -Go to properties
    -Select "libraries" in the list on the left
    -Click "add JAR/Folder" on the right
    -Then browse for the JAR-file and double-click

    Next thing to do is to import the packages from this library in your project. For the package "org.apache.commons.net" the import statement:
    Java Code:
    import org.apache.commons.net.*;
    Hope it helps,

  5. #5
    hitmen is offline Member
    Join Date
    Oct 2008
    Posts
    58
    Rep Power
    0

    Default

    Hi! I am facing a similar problem. I need to import com.sun.java.swing.* but there are over 421 class files. What should I do?
    I found them at findjar.com. Can anyone help?

  6. #6
    hitmen is offline Member
    Join Date
    Oct 2008
    Posts
    58
    Rep Power
    0

Similar Threads

  1. error with import java.io.*
    By osval in forum New To Java
    Replies: 5
    Last Post: 05-13-2010, 06:03 PM
  2. how to import a picture into an applet
    By cecily in forum Java Applets
    Replies: 2
    Last Post: 01-15-2010, 09:51 PM
  3. How to import a package in Eclipse?
    By naipulb in forum New To Java
    Replies: 2
    Last Post: 06-09-2008, 12:04 PM
  4. import statement.
    By diRisig in forum New To Java
    Replies: 2
    Last Post: 02-08-2008, 01:34 AM
  5. I can't import javax.mail
    By katie in forum New To Java
    Replies: 2
    Last Post: 08-04-2007, 06:05 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
  •