JavaTM
Java was the language of the month in February 1997.
 | Back to the Language of the
month page. |
 | Go to next language:
MetaCard. |
 | Go to previous language:
Python. |
|
About the language
The Java language has been developed by Sun Microsystems. It is a
general purpose, object oriented language. Java was first used to
create tiny applications, called applets. Applets are platform
independant applications designed to execute within a browser. Java
Applets were rapidly supported by Netscape and were used to make Web
pages sexy adding animations, clever image maps, etc.
This kind of applets made Java popular. However Java can do lot
more. It can really be used to build industrial strength systems
as you do today in C++. Moreover, Java has many advantages over C++:
- Java supports garbage collection. This frees the
developper to manage by hand memory deallocation. Garbage collection
avoids two kinds of errors: in a language like C++ or Ada 95 a developper
could free too many or too little memory.
In the first case the developper is throwing out the baby with
the bath water. In the second case the application will take more an
more memory as time goes on.
- Java is a multiplatform language and provides byte-code
portability. Many languages are more or less "portable" meaning
"you only need to recompile your code to get an executable for
another operating system". With many languages this doesn't work
very well and you'll still have to support many operating systems
"by hand".
When compiling a Java program you get Java byte-code,
not an executable. This byte-code can be run on any operating system
where a Java Virtual Machine (JVM) is available. This enables
the developper to build its application once and then to distribute
the same Java byte-code to all its client whatever operating system
they are using.
- Unlike C++, Java is a modern purly object oriented
language. Java is simpler to learn then C++ partly. Unlike C++, Java
enables you to write portable multi-threaded applications. A
portable library for writting GUI-based is also provided (the
Abstract Window Toolkit or AWT).
What I think of the language
I won't tell you Java is the
best language. However I am convinced it is a good one. In fact I
think Java is certainly one of the best languages you could choose for
general programming. In many cases it will be a better choice then C++
or Ada 95.
We have seen that Java has many advantages over older, more
traditional languages such as C++. Just to refresh your mind, a
garbage collector, a native support for multi-threaded applications,
portable GUI and TCP/IP libraries come free with Java.
However Java is certainly not perfect. Java and C++ syntax are very
similar. This is perhaps a positive point since old hand C++
programmers will find Java syntax easy and will be more encline to
adopt this new language. (This is perhaps an other reason on Java's
success.) However C++ syntax is certainly not the nicer syntax I've
ever seen.
Two C++ usefull features are also absent from Java:
genericity and multiple inheritance. Java is an evolving
language and there is a hope that those two features will be added in
futur versions of Java.
Projets involving Java
-
A lot of applications are
today developped in Java. To do so several environments are available
to the programmers. Actually I think the best one is
Symantec
Visual Café Pro for Windows. However Café is only available for
Windows.
If you are using an other operating system, give a look to
Sun Java
Workshop. This is also an excellent developpement environment wich
should run on any operating system having a JVM. However only Solaris and
Windows 95/NT are officialy supported by Sun.
There are also
Asymetrix
SuperCede and
Microsoft J++. I didn't
find those two environments really convincing. However other two major
developpement environments will soon be available:
IBM VisualAge for Java
and Borland JBuilder.
So keep an eye open.
- If you are looking for informations about Java, give look first at
JavaSoft. You'll find there the
Java Developpment kit (JDK) and all the official Java documentation
(API, language reference, etc).
If you're looking for an example or a particular library, give a look to
Gamelan, a Java code repository.
Give also a look to alphaWorks,
the online Java experimentation laboratory of IBM. Their site is simply
great and the presented technology is worth a look.
Java and all Java-based trademarks and logos are trademarks or
registered trademarks of Sun Microsystems, Inc. in the U.S. and other
countries.
|