Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Implementing an existing interface

Thread view: 
golem - 13 Feb 2006 18:41 GMT
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

Signature

golem

Oliver Wong - 13 Feb 2006 18:49 GMT
> 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
golem - 13 Feb 2006 19:01 GMT
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

Signature

golem

Dave Glasser - 13 Feb 2006 22:00 GMT
"golem" <a.klopotek@gmail.com> 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.

Signature

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

golem - 16 Feb 2006 15:54 GMT
> 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.

Signature

golem

tom fredriksen - 14 Feb 2006 11:41 GMT
> 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
Oliver Wong - 15 Feb 2006 15:41 GMT
> 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
Thomas Kellerer - 13 Feb 2006 22:11 GMT
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
golem - 16 Feb 2006 15:51 GMT
ArrayList *provides* an interface, similarily every (not necessarily
public) class does. Don't think of an interface as a Java-exclusive
term.

Signature

golem

tom fredriksen - 16 Feb 2006 23:17 GMT
> 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
Nigel Wade - 17 Feb 2006 12:02 GMT
> 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.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

Ian Pilcher - 14 Feb 2006 17:10 GMT
> 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.

Signature

========================================================================
Ian Pilcher                                        i.pilcher@comcast.net
========================================================================

golem - 16 Feb 2006 16:07 GMT
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 :)

Signature

golem

Ian Pilcher - 16 Feb 2006 19:17 GMT
> 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.

Signature

========================================================================
Ian Pilcher                                        i.pilcher@comcast.net
========================================================================



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.