GNU Java packages

C

cold80

I've just discovered the existence of the GCJ compiler and the GNU
Java libraries. I've configured my Eclipse to use it as default JVM
and compiler. Now I see that inside the file .jar there are different
packages than the Sun version. There're always the "standard" packages
(java, java.awt, etc) but there are also the "GNU version" (gnu.java,
gnu.awt and so on). Now, what's the difference? If I use the normal
package, am I sure that the application will work with Sun VM too?
Because if I use the gnu version the computer where I will install the
software must have the GCJ and the GNU libraries, right? Are the GNU
version of the libraries just an extension of the original ones or the
purpose is to rewrite a open version of the Java libraries?

Thank you in advance for your help

Cold
 
T

Thomas Fritsch

cold80 said:
I've just discovered the existence of the GCJ compiler and the GNU
Java libraries. I've configured my Eclipse to use it as default JVM
and compiler. Now I see that inside the file .jar there are different
packages than the Sun version. There're always the "standard" packages
(java, java.awt, etc) but there are also the "GNU version" (gnu.java,
gnu.awt and so on). Now, what's the difference? If I use the normal
package, am I sure that the application will work with Sun VM too?
Because if I use the gnu version the computer where I will install the
software must have the GCJ and the GNU libraries, right? Are the GNU
version of the libraries just an extension of the original ones or the
purpose is to rewrite a open version of the Java libraries?
It is meant as an open version of the Java libraries.

See <http://savannah.gnu.org/projects/classpath/> and
<http://www.gnu.org/software/classpath/>
 
T

Thomas Fritsch

cold80 said:
OK, but which is "meant as an open version of the Java libraries"? The
traditional packages or the gnu.* packages or both? In this case, what
are the gnu.* packages? Just extensions of the other ones?

Hope my question is clearer now...
Aah, I see clear now.

The whole GNU thing (i.e. its packages java.* and gnu.*) is meant to
replace the whole Sun thing (i.e. their packages java.* and sun.*).

When you compare the source code of GNU's and Sun's java.* packages,
you'll see they are different. Actually the GNU people reinvented the
java.* packages from scratch, without even looking into Sun's source
code, only with looking into their API docs.
The Java developer (i.e. you) will only use the java.* packages, but not
the gnu.* or sun.* packages.
 
C

cold80

cold80 schrieb:








Aah, I see clear now.

The whole GNU thing (i.e. its packages java.* and gnu.*) is meant to
replace the whole Sun thing (i.e. their packages java.* and sun.*).

When you compare the source code of GNU's and Sun's java.* packages,
you'll see they are different. Actually the GNU people reinvented the
java.* packages from scratch, without even looking into Sun's source
code, only with looking into their API docs.
The Java developer (i.e. you) will only use the java.* packages, but not
the gnu.* or sun.* packages.

Ah, OK, now I understand...the gnu.* package contains the stuff that
was "Sun specific" in the Sun implementation. But, even if the source
code is different in GNU version of the java.* packages, the signature
of the methods and the object are supposed to be the same, right? I
read that the GNU version is not as complete as the Sun version, but
do you think for a new project is better to use one or the other? And
why, as I heard that Sun realesed the JDK under the GNU license, is
preferable to use the GNU version all the same?

Thank you very much for your help

Cold
 
L

Lew

cold80 said:
Ah, OK, now I understand...the gnu.* package contains the stuff that
was "Sun specific" in the Sun implementation. But, even if the source
code is different in GNU version of the java.* packages, the signature
of the methods and the object are supposed to be the same, right? I
read that the GNU version is not as complete as the Sun version, but
do you think for a new project is better to use one or the other? And
why, as I heard that Sun realesed the JDK under the GNU license, is
preferable to use the GNU version all the same?

Personally I never preferred the Gnu version. The Sun version is free, now
open source at least in part, very efficient and, of course, guaranteed
compliant. Gnu's version never worked for me. Also, AIUI, the Gnu version
lacks features of Sun's. Furthermore, isn't Gnu still back at the nearly
obsolete 1.4 level? I'm pretty darn sure they aren't current with 6, at least.

Another really good JVM is IBM's. Their version 6 is in beta now.
 
O

Oliver Wong

cold80 said:
I
read that the GNU version is not as complete as the Sun version, but
do you think for a new project is better to use one or the other? And
why, as I heard that Sun realesed the JDK under the GNU license, is
preferable to use the GNU version all the same?

Thank you very much for your help

If you care a lot about the open-source-vs-close-source debate, then
you probably have your own opinions about whether Sun or GNU's library is
better, so you should just pick the one that you think is better.

If you don't really care, then take Sun's. More people have Sun's than
GNU's, so you'll have greater compatibility that way.

- Oliver
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Oliver said:
If you care a lot about the open-source-vs-close-source debate, then
you probably have your own opinions about whether Sun or GNU's library is
better, so you should just pick the one that you think is better.

The SUN library are also open source today.

Even the same license: GPL with classpath exception.

Arne
 
M

Mike Schilling

Lew said:
Personally I never preferred the Gnu version. The Sun version is free,
now open source at least in part, very efficient and, of course,
guaranteed compliant. Gnu's version never worked for me. Also, AIUI, the
Gnu version lacks features of Sun's. Furthermore, isn't Gnu still back at
the nearly obsolete 1.4 level? I'm pretty darn sure they aren't current
with 6, at least.

Another really good JVM is IBM's. Their version 6 is in beta now.

IBM's is also guaranteed compliant, since they passed the compatibility
tests. Fortunately, none of the non-compliant "Java"s have made much
headway in the business community. I dread having to create N different
versions of my company's software, the way we had to back in the Unix/C
days. And in Java, we don't even have #ifdef to help us with doing that
(if you call that help).
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top