Results 1 to 11 of 11
  1. #1
    anilshelar is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default How to add jar library in java?

    Hi Friends,

    Could it possible to add library in Java libraris?
    like java.io.DataInputStream is library in Java (JDK), so I want to add my own library in Java JDK.

    I have created a package net.jini.j2space and one interface in it J2Space, I have created jar of this.
    and now I want to this jar to Java library so I can import it in my projects.

    Please help me.
    Thanks and Regards
    Anil

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Why do you want it to be part of the Java libraries?

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

    Default

    Last edited by pbrockway2; 08-29-2009 at 11:03 PM.

  4. #4
    anilshelar is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default How to add jar library in java?

    reply to:r035198x

    I want to develop a project in java space for which tr is one interface in java for it net.jini.space.JavaSpace, Which provides 6 methods I want to add new methods for java space for that i have created new package net.jini.j2space and new interface J2Space.java which contains new methods for handling javaspace. but i can't able to use it in my sample project because error in import :package j2space not found
    Last edited by anilshelar; 08-29-2009 at 11:45 AM. Reason: Reply to which post not added

  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
    20

    Default

    Did you try to include in Java src package. In your Java installation folder you can see a zip file name as src. It contains the standard packages. Just extract and see. You can added your package into that and use.

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Quote Originally Posted by Eranga View Post
    Did you try to include in Java src package. In your Java installation folder you can see a zip file name as src. It contains the standard packages. Just extract and see. You can added your package into that and use.
    Nah, that zip file has nothing to do with it. The OP's question was already answered at the Sun's forum.

  7. #7
    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

    Quote Originally Posted by r035198x View Post
    Nah, that zip file has nothing to do with it. The OP's question was already answered at the Sun's forum.
    You say that we cannot added and jar file in that zip folder? Interesting, since it's deal with the class path it should work.

  8. #8
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    That src.zip is not used at all by java during compiling or running of programs. It's not on any class path. The reason is because it doesn't contain any classes at all. Just the source code for the core Java classes.

  9. #9
    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

    Oh no, I forget that. It contain all java source file, not class files at all. It's my mistake. Thanks for the pointing me.

  10. #10
    anilshelar is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default How to add jar library in java?

    Thanks to all friends.

    Problem solved

  11. #11
    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. Replies: 3
    Last Post: 09-07-2009, 01:28 PM
  2. Questions On Java GUI Library
    By hitmen in forum AWT / Swing
    Replies: 8
    Last Post: 02-26-2009, 10:50 AM
  3. java graph 3d library?
    By novata in forum New To Java
    Replies: 4
    Last Post: 10-05-2008, 11:55 PM
  4. Tell me jar file for library library org.bouncycastle.cms
    By 82rathi.angara in forum New To Java
    Replies: 10
    Last Post: 09-09-2008, 05:11 AM
  5. Which Java-XML library or technology is best for my needs?
    By nitingupta183 in forum Advanced Java
    Replies: 1
    Last Post: 03-15-2008, 06:34 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
  •