Implementing an existing interface

Discussion in 'Java' started by golem, Feb 13, 2006.

  1. golem

    golem Guest

    Hi!

    Assume that I want to create my own implementation of an existing
    interface, eg. java.lang.ArrayList. Will it be OK if I use the
    interface
    designed by Sun, ie. won't it be in violation with copyright law?

    Thanks in advance

    --
    golem
    golem, Feb 13, 2006
    #1
    1. Advertising

  2. golem

    Oliver Wong Guest

    "golem" <> wrote in message
    news:...
    > Hi!
    >
    > Assume that I want to create my own implementation of an existing
    > interface, eg. java.lang.ArrayList. Will it be OK if I use the
    > interface
    > designed by Sun, ie. won't it be in violation with copyright law?


    I am not a lawyer, but I've seen lots of people implement interfaces
    written by Sun. That's sort of the whole point behind having an interface.
    Sun, for example, publishes some interfaces for parsing XML files, and it's
    only 3rd parties, such as Apache, who actually writes the implementation for
    those interfaces (e.g. the Xerces parser).

    So unless you have some special reason to worry, I wouldn't worry too
    much about it.

    - Oliver
    Oliver Wong, Feb 13, 2006
    #2
    1. Advertising

  3. golem

    golem Guest

    Nice to hear that.. then I understand it would be all legal if I made a
    port of the whole Sun's API to another platform or even implemented it
    in another language? Nice...

    Thx

    --
    golem
    golem, Feb 13, 2006
    #3
  4. golem

    Dave Glasser Guest

    "golem" <> wrote on 13 Feb 2006 11:01:39 -0800 in
    comp.lang.java.programmer:

    >Nice to hear that.. then I understand it would be all legal if I made a
    >port of the whole Sun's API to another platform or even implemented it
    >in another language? Nice...


    First you should learn what "interface" means in the Java language.
    Then you might understand the answer you were given.




    --
    Check out QueryForm, a free, open source, Java/Swing-based
    front end for relational databases.

    http://qform.sourceforge.net

    If you're a musician, check out RPitch Relative Pitch
    Ear Training Software.

    http://rpitch.sourceforge.net
    Dave Glasser, Feb 13, 2006
    #4
  5. golem wrote on 13.02.2006 19:41:
    > Hi!
    >
    > Assume that I want to create my own implementation of an existing
    > interface, eg. java.lang.ArrayList. Will it be OK if I use the
    > interface
    > designed by Sun, ie. won't it be in violation with copyright law?


    ArrayList is *not* an interface.

    Thomas
    Thomas Kellerer, Feb 13, 2006
    #5
  6. golem wrote:
    > Nice to hear that.. then I understand it would be all legal if I made a
    > port of the whole Sun's API to another platform or even implemented it
    > in another language? Nice...


    What you are talking about here is probably reimplementing the jdk API.

    An interface in java is an abstract programming construct (such as List
    or Iterable), while the API is a concrete implementation (such as
    ArrayList and BufferedWriter) and under a Sun license. I.e. you are not
    allowed to call such a software package anything Java or Java API unless
    it is licensed by Sun and has passed the conformance tests. (Thats why
    microsoft in the end, had to stop supporting java and then created C# as
    a replacement in its product line)

    So, if you want to port the entire jdk to another platform etc, I think
    you should talk with Sun about it first.
    But, if you are just talking about creating a 3rd party implementation
    of one of javas framework etc, such as a cryptolib or collections
    package, then go right ahead, thats what those frameworks and interfaces
    are there for.

    /tom
    tom fredriksen, Feb 14, 2006
    #6
  7. golem

    Ian Pilcher Guest

    golem wrote:
    > Assume that I want to create my own implementation of an existing
    > interface, eg. java.lang.ArrayList. Will it be OK if I use the
    > interface
    > designed by Sun, ie. won't it be in violation with copyright law?


    ArrayList is not an interface. It is a class which implements the List
    interface, among others.

    --
    ========================================================================
    Ian Pilcher
    ========================================================================
    Ian Pilcher, Feb 14, 2006
    #7
  8. golem

    Oliver Wong Guest

    "golem" <> wrote in message
    news:...
    > Nice to hear that.. then I understand it would be all legal if I made a
    > port of the whole Sun's API to another platform or even implemented it
    > in another language? Nice...


    See the Gnu ClassPath. They are essentially doing what you are doing.
    Might want to ask them what legal issues they have considered before
    starting their project.

    http://www.gnu.org/software/classpath/

    - Oliver
    Oliver Wong, Feb 15, 2006
    #8
  9. golem

    golem Guest

    ArrayList *provides* an interface, similarily every (not necessarily
    public) class does. Don't think of an interface as a Java-exclusive
    term.

    --
    golem
    golem, Feb 16, 2006
    #9
  10. golem

    golem Guest

    > First you should learn what "interface" means in the Java language.
    > Then you might understand the answer you were given.


    I was talking about "interface" in the context of object oriented
    programming, not java interface.

    --
    golem
    golem, Feb 16, 2006
    #10
  11. golem

    golem Guest

    Hm.. to make it clear:

    "An interface defines the communication boundary between two entities,
    such as a piece of software, a hardware device, or a user. It generally
    refers to an abstraction that an entity provides of itself to the
    outside. (...)" (wikipedia)

    As you can see, the term is not strictly related with java or even with
    a programming language. Furthermore:

    "The Java programming language takes a *different* approach to the
    concept of the interface normally existing in other object-oriented
    programming languages (ie., that the interface specified is the
    interface to the class), in that an interface specifies a set of
    methods which implement some specific functionality, common to a set of
    classes. See protocol (object-oriented programming)." (wikipedia)

    In my post I have been talking about an interface in its wider sense.
    Hope this made the issue clear :)

    --
    golem
    golem, Feb 16, 2006
    #11
  12. golem

    Ian Pilcher Guest

    golem wrote:
    > As you can see, the term is not strictly related with java or even with
    > a programming language. Furthermore:


    This, however, comp.lang.JAVA.programmer.

    --
    ========================================================================
    Ian Pilcher
    ========================================================================
    Ian Pilcher, Feb 16, 2006
    #12
  13. golem wrote:
    > ArrayList *provides* an interface, similarily every (not necessarily
    > public) class does. Don't think of an interface as a Java-exclusive
    > term.


    I think you need to be more specific about your question and what yoyu
    want to achieve for us to be able to help you. Questions that come to
    mind are:
    - are you just talking about creating a similar class or
    - are you reimplementing this class only or a larger part of the jdk
    tom fredriksen, Feb 16, 2006
    #13
  14. golem

    Nigel Wade Guest

    golem wrote:

    > ArrayList *provides* an interface, similarily every (not necessarily
    > public) class does.


    The term API is commonly used for this, and avoids confusion.

    > Don't think of an interface as a Java-exclusive
    > term.


    Unfortunately a Java "interface" is a very specific part of the language spec.
    and is different from an API. Hence the confusion.


    --
    Nigel Wade, System Administrator, Space Plasma Physics Group,
    University of Leicester, Leicester, LE1 7RH, UK
    E-mail :
    Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
    Nigel Wade, Feb 17, 2006
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gomathi

    Implementing Interface

    Gomathi, Nov 17, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    549
    S.M. Altaf [MVP]
    Nov 17, 2005
  2. nrm
    Replies:
    3
    Views:
    515
  3. Carla
    Replies:
    3
    Views:
    615
  4. Implementing an existing WSDL in ASP.NET?

    , May 6, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    193
    Jan Tielens
    May 6, 2004
  5. Replies:
    0
    Views:
    175
Loading...

Share This Page