Download Java - Past, Current And Future Trends

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Java - Past, Current And Future Trends
Thom Olausson & Mikael Johansson
25th May 2006
Abstract
This report goes through Sun Microsystems programming language
Java from early years until today and what’s to expect in the near future.
Therefor are the main topics Java history, Java today and the next coming
trends which will give us, and the reader, a deeper understanding of Java
and its architecture. We put a focus on describing new important features
in each release. Each release has many new functionalities that improves
the Java technology. But Java is not outstanding and totally free from
drawbacks so we mentions both advantages and disadvantages.
Release features that exists in this report are Abstract Windowing Tookit
(AWT), Swing, Java Database Connectivity (JDBC), Java Native Interface (JNI), Java Security Model, generics and more. We had also written
and discussed about Sun Microsystems licenses for Java, for instance the
open-source topic which have both advantages and risks. Another topic
we bring up is the potential threat from Microsoft’s .NET, specially C#.
1
Contents
1 Introduction
3
2 Java history
2.1 The very beginning of Java . . . . . . . . . . . . . . . . . . . . .
2.2 How Oak became Java . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Java and the World Wide Web . . . . . . . . . . . . . . . . . . .
3
3
4
4
3 Java Runtime Environment and Java Virtual Machine
5
4 Java Platform Standard Edition
4.1 Old and current releases . . . . . . . . . . . . . . .
4.1.1 JDK 1.x.x . . . . . . . . . . . . . . . . . . .
4.1.2 J2SE Playground . . . . . . . . . . . . . . .
4.1.3 J2SE Kestrel . . . . . . . . . . . . . . . . .
4.1.4 J2SE Merlin . . . . . . . . . . . . . . . . .
4.1.5 J2SE Tiger . . . . . . . . . . . . . . . . . .
4.2 Future releases . . . . . . . . . . . . . . . . . . . .
4.2.1 J2SE Mustang (former Dragon/Dragonfly)
4.2.2 J2SE Dolphin . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
5
5
7
8
9
10
12
12
13
5 Current and future licenses
14
6 Current and future threats
15
7 Conclusion
15
2
1
Introduction
Java is currently one of the most popular programming languages, but have
Java always been popular and will it keep its popularity in the future? What’s
the advantage and disadvantage with Java? Every new version release of the
Java framework has its own purpose, benefits and news, what are those? What
makes graphical development in Java more easy than in other language, such as
C++ and how does it work?
To get all those answers and achieve our goal with this report we’ll have to
start from the beginning to get the idea of why Java was actually designed in
the first place and how it has developed over the years. The line of action is
therefor to start with a short history of Java and continue through all version
releases of the Java framework and its mainly changes. We will also go through
the graphical libraries AWT and Swing since that is a big topic in programming.
All those parts in the report will probably give us a hint of why Java is one of
the leading programming languages today but hopefully also an indication of
its use in the future.
2
2.1
Java history
The very beginning of Java
In the early nineties 13 people (Green Team) at Sun Microsystems started to
develop a platform-independent language named Oak (Green Project)[11]. The
intension wasn’t to create a new language, rather to develop ”smart” consumer
electronic devices that could all be centrally controlled and also programmable
from a ”remote control like” device[7]. The programming language that was
used from the beginning was C++, but after a while they realized that C++
was inadequate for this type of project so James Gosling (also known as ”The
Father Of Java”) started to modify C++ to meet the requirements and this was
the first steps towards the development of an independent language.
From the beginning Gosling called the language Oak but they had to change
that to Java (James Gosling, Arthur Van Hoff, Andy Bechtolsheim)[7] as the
name Oak was copyrighted (more of the language later). After 18 month of work
in an anonymous office and without any communication with Sun Microsystems
they come up with a handheld home-entertainment device controller that had
an animated touchscreen. This controller had an operating system, its own language, a toolkit, an interface, a new hardware platform. The device was called
StarSeven (*7 ) after ”answer your phone from any extension”; a feature that
the Green Team had in there office, which means that a key combination did it
possible to answer any other ringing telephone on their network[7].
StarSeven could control a wide range of entertainment platforms and it ran
on an - as already mention - entirely new, processor-independent language. The
device, or rather it’s technology, wasn’t any success (as they thought from the
beginning) in the customer electronics industry and the direction of Oak was
somewhat uncertain.
3
2.2
How Oak became Java
Since the market, in the first place, was the electronics market there were several
criterias that had to be in concern. High reliability, that is, allowing the least
amount of programming errors. Secondly, an electronics device should not have
to be rebooted in a certain time interval, and most important of all, the compatibility. Because of all different manufacturers on the market the language
had to be platform independent and also independent of the CPU. Since C++
wasn’t up to security demands and networking, Gosling started to develop Oak
that was supposed to have higher degree of orderliness, more secure and better
networking feature than C++. Oak was also designed to be an interpreted language which means that the compiler outputs byte-code that then is run by a
byte-code interpreter. In some sense they actually wanted ”C++ ++ --” where
the extra ”++” stands for the garbage collector and the ”--” the rarely used
aspects such as operator overloading[9].
Looking at, and compare, to C++, first of all, things that was identified as
potential error causes in C++, such as multiple-inheritance, operator overloading and pointers was eliminated and things like concurrency, interfaces, packages
and garbage collections was added, the latter to achieve more efficient memory
handling, which concern reliability[9].
As already mention, Oak later on become Java since Oak was already on the
trademarket. Java in itself was new but the technology behind wasn’t. For
example; Classes came from C++, concurrency from Mesa, exception handling
from Modula-3 and so forth[9].
2.3
Java and the World Wide Web
After many different directions (set-top box OS, video-on-demand services and
so forth) Java ended up in the Web direction. In September 1994, Naughton
and Jonathan Payne at Sun Microsystems started to write a browser called
”WebRunner” (after the movie Blade Runner ) using the Java technology and
by October 1994 they come up with a stable version of WebRunner as they now
called ”HotJava” which ended up to be the official name of the browser. The
most impressive with HotJava was that it could show animated moving objects
and dynamic executable content inside the Web browser and that had never
been done before[10].
After that it was time to announce Java to other companies. Marc Andreesen
at Netscape decided to incorporate Java into their next browser release, and
then Java began to expand to other companies as well, such as IBM, Oracle,
Borland, Adobe, Macromedia etc[9]. Later, Microsoft also announced that they
would support Java in their web browser, Internet Explorer, and also in their
operating system and development tools[9]. Now Java had (kind of) hit the
market.
4
3
Java Runtime Environment and Java Virtual
Machine
To get the understanding how Java actually works and is built up we have to
look at the main parts in the JDK (Java Development Kit). To be able to
develop or to run an already developed program in java you need to have the
JDK installed. In the JDK you find the JRE (Java Runtime Environment) and
the JVM (Java Virtual Machine) and of course the compiler (Javac). When you
compile your java code (.java-file) the javac compiler compiles it to byte-code,
and that is the .class-file which ends up as the output from the compiler. To run
this .class-file you need to translate the byte-code to the host machine’s language
and this is done with the JVM inside JRE (this step is why Java is platform
idependent). The JVM runs inside the JRE and decodes every statement one
at a time and is therefor very slow and has a lot of overhead, but since the JVM
start using Just In Time Compilation that is built into the JVM the slowness
was reduced[8]. The JIT takes care of the byte-code translation to native code
- in runtime - which reducing the overhead which also makes the program run
faster. One drawback is that you loose the advantage when debugging if you
use the JIT since when Java bytecode are interpreted by the JVM it will point
directly to the cause of the error.
A Java Applet is working the same way except that the browser has the JVM
built in and the .class-file is downloaded from its location with a special source
tag in the HTML-code.
4
4.1
4.1.1
Java Platform Standard Edition
Old and current releases
JDK 1.x.x
In January 23, 1996 Sun Microsystems released Java JDK 1.0 about ten month
after the first alpha release. This version were build after software developers
wishes and consist of - among other things - class libraries for graphics, sounds,
networking, file handling and more[1]. Many companies ware quickly out and
wanted to be licensed for the Java source code so they could begin and develop
and integrate Java to their applications and operating systems. Some of the
first companies were Microsoft, Netscape, IBM, Oracle and Toshiba. In version
1.0 Mac OS wasn’t yet supported but that was, however, Windows 95/NT on
Intel and Solaris on SPARC.
Sun Microsystems also introduced the slogan ”Write once - run anywhere” with
the meaning that the same program can be run in any system that has a JVM.
But that slogan wasn’t achieved from the beginning since Java had a lot of
problems. Many Java users changed ingeniously the slogan to ”Write once debug everything”. There was for instance incompability problems between different platforms and different JDK versions (JDK 1.02 and JDK 1.1). Microsoft
didn’t hesitate to criticize this incompability. ”We realized Sun would lose the
platform battle when we saw how incompatible JDK 1.1 was with 1.02,” Willis
5
said. ”Today we are literally ’write once, run 42 percent of everywhere.’ ”[2]
This section about JDK includes version 1.0, Sparkler (v1.1.4), Pumpkin (v1.x.5),
Abigail (v1.1.6), Brutus (v1.1.7) and Chelsea (v1.1.8).
AWT
Abstract Windowing Toolkit (AWT) is a user interface toolkit included in Java’s
class library (a part of Java Foundation Classes, JFC). AWT make it easy to
make graphical programs without knowing exactly about how every click and
action interacts with the operating system functions for keyboard and mouse
devices. AWT is in this early version very basic, which means that you don’t
have ordinary components like progress bars, color choosers, sliders etc and with
that restriction prevents developers from doing professional looking applications.
At the same moment as Sun Microsystems has released AWT for JDK 1.0,
Microsoft battled with their own version of the classes called AFC (Application
Foundation Classes). In a article[3] in January 21, 1997 Microsoft wrote that
theirs AFC will be a help out of the Java’s dark ages into a more professional
development when it’s shipped.
In February 19, 1997 Sun Microsystems countered back with their JDK 1.1
and said that the new version is much better and also point out that Microsoft’s
AFC will not be shipped before May[4]. In opposite to AWT the AFC source
code is totally closed, which makes it less popular for many developers.
AWT uses heavy weighted components which uses the operating system window system to display the components. Lightweight components uses the Java’s
own window system and will therefore not differ in look on different operating
systems. Lightweight components were introduced with Swing in a later release.
In this release Sun Microsystems put more energy to improve the quality and
performance for AWT so it can be used for larger GUI development. Actually Sun Microsystems re-wrote the whole win32 version of AWT to fulfil the
performance requirements and to make it more consistent with other platforms.
JAR
JAR (Java Archive), is a ZIP file format that can contain different files as images,
class files and sounds. With that Java applets can be boundled into one JAR
file and downloaded just through one HTTP Get Request and then be executed
locally. This will make the applet download more effective. It’s also possible to
sign individual files in the JAR file to ensure that files hasn’t been modified.
RMI
The RMI (Remote Method Invocation) feature makes it possible to make distributed Java-to-Java applications. RMI allows methods in remote Java objects
to be invoked from other machines that are running Java Virtual Machine. This
functionality is also called Remote Procedure Call (RPC).
6
Java Database Connectivity
A new and very important feature in JDK 1.1 is the JDBC which is a standard
SQL interface for database access. The SQL framework is generic and have
a common interface on top of each database connectivity module so that the
access the database can be DBMS-independent. [5]
Java Native Interface
JNI allows Java applications to communicate with applications and libraries
written in other languages. This compability between native code and Java
native code can for instance be used in realtime systems since native code is in
many cases faster than Java native code. JNI can also be used when the Java’s
class libraries doesn’t support a platform dependent function or feature.
By reading the JDK 1.x.x New Features Documentation [6] one can see that
Java is in an young stage since the document mention new functionalities as
popup menus and clipboard (copy/paste), which is a very basic functions.
4.1.2
J2SE Playground
The next big release of JDK was in December 1998 when Sun Microsystems
announced Java 2 platform. The name was now changed and the target was the
web. In the pressrelease you can read the following; ”The Java 2 platform is the
definitive environment for enterprises aiming to build and install web-centric
software applications that can run on a variety of computers, servers and other
computing devices.”[12]. It’s obvious that the main goal with this release is to
make it more easy for the programmer but also that it is a big focus on security
and performance enhancements.
The new Java 2 was welcomed of the developers since with earlier versions of the
JDK (1.0 and 1.1) there were many things that couldn’t be accomplished. For
instance, a ”simple” task as printing out to a printer within the Java program
was impossible because it was not supported[13], if you wanted to do some nice
user interface it demanded a lot of work and if you wanted to do some executable
in your applet, the so called ”sandbox” prevent you from it.
With Java 2 many changes was made and things were added. Here are the
biggest changes in a short description.
Java security model
One of the most important parts in this release is the improvement in Java security architecture. To get the idea how this works and to understand it better
the next few lines will give a short description of Java Security Model that was
first released in Java 1.0. The security infrastructure is built into the Java Virtual Machine and the java.lang library and the reason why this security model
is implemented is because things now can be downloaded through the network,
in run-time, within a browser (through an applet) and executed on the local
computer. This can of course be a potential risk for an attack (evil code).
7
To prevent such risks, Java provides a sandbox in which Java programs run.
Just to illustrate we can take an example; You normally make a decision whether
or not a sources is reliable, when you have done that decision and accepted the
source, you have actually said ”OK, do what ever you want, I trust you”. But
with the Java security model it doesn’t work exactly that way. In the sandbox
an applet is restricted because the sandbox filter out evil code and you don’t
need to worry about that. Further on, the sandbox prevent untrusted java applets from reading-writing to the local computer, establish network connections
(except from the host of the applet), creating processes and loading dynamic
libraries[14].
In the sandbox model, the code that are run local is trusted and has full access
to the system (the file system for example) but remote code (such an applet) has
restricted access provided inside the sandbox. In Java 2 there has been some
improvements to this model and those are that the code (whether or not it’s
local or remote) is part of a domain that is set up by the system and that has
different level of access. This means that a domain can be configured and set
up exactly as an sandbox but it can also be configured to have full access, that
is up to the user or administrator [15].
Java Plug-in
To all browser vendors the Java Plug-in was an appreciate feature. Until this
version of Java, the browser vendors had to wait until Sun Microsystems released
a new version of the JDK since they wanted to implement the newest version of
the JRE component before they released the new version of their browser. Of
course, Sun Microsystems was aware of this problem and finally got the solution
to the problem. The solution they come up with was to use plug-in technology.
With this technology it was possible to download and install every new version
that was released through the browser in run-time.
Java Foundation Classes
Until this point the only tools that could be used to build graphical user interfaces was AWT. To expand the graphical possibilities, Sun Microsystems
introduced the Java Foundation Classes that had the Swing component. Swing
includes all the components that was earlier mentioned which now makes it
possible to use Java in all areas (in theory at least).
4.1.3
J2SE Kestrel
J2SE v1.3, also known as Kestrel was released in May 8, 2000. This release
got better performance than the previous J2SE version. According to Sun Microsystems own release report [16] it is 40% faster in startup time and have a
25% smaller RAM footprint in some cases. Other new features are mentioned
bellow [18].
RMI/IIOP
RMI/IIOP means RMI over Internet Inter-Orb Protocol. Before this Java version the language didn’t allowed combinations of using RMI and COBRA’s
8
IIOP. CORBA (Common Object Request Broker Architechture) is a standard
when building software components. CORBA with Java Interface Definition
Language makes it possible to write applications that can communicate with
any CORBA compatible clients and servers.
Java Sound
Java gets a sound engine for both applications and applets and it will now
support MIDI, AIFF, AU and WAV files in 8- and 16 bits. It has a number of
new features for capturing, processing and playing back audio. [17]
Java 2D
Java 2D API provides functionality to work with graphics, images, text and line
art. This version has added some more functionality as:
• ability to create frames and windows on different screen devices
• support for the image file format PNG so it can be used as GIF and JPEG
files.
• dynamic font loading in runtime that makes it possible to select a TrueType font file and use it in the program.
AWT
As mentioned above about Java 2D Java can now create frames and windows on
different screen devices. AWT has also got a class named Robot that can test
can test AWT and Swing components by generating events on operating system level. The Robot class is very useful for bug testing graphical user interfaces.
Kestrel also got the AWT Native Interface that allows to create AWT components that can be accessed by native code.
Swing
This Swing version have many new features, but no big ones. For instance
JTree got a function for decide how many mouse clicks that are needed for
expanding/collapse a tree node and the JTabbedPane got a function that allows
to add a tooltip on a tab.
4.1.4
J2SE Merlin
This release of the Java Framework wasn’t design entirely of Sun Microsystems,
since they used the Java Community Process (JCP) for the first time. The JCP
consists of the Java Specification Requests (JSR) that are submitted of a Java
Specification Participant (JSR) who is someone that has signed the Java Specification Participation Agreement, which are formal documents with purpose and
specification of things that will be added to the Java platform. The documents
are public and the whole idea is that the companies and other Java developers
can now effect the design process of newer versions.
9
Not all were to happy with this process since if you want to be a part of this
process you need to join with a small fee and that made people irritated, especially Simon St.Laurent: ”The JCP may feel like an ’open’ process if you’re a
mammoth, or even if you’re a reasonably well-off sabre-toothed tiger, but to us
small mammals, it’s the same old s***, different day[...]. Giving Sun $5000 so
this poor company can manage a not-so-open process (’Process Cost Sharing’)
is ridiculous.”[19], he said on the XML-development mailing list.
Regardless of what people think about the fee, the idea was good because the developers could now get what they missed in the API and Sun Microsystems got
help finding the missing parts that people wanted in the new, upcoming releases.
The big news in the Merlin version is connectivity enhancements, new GUI
features and changes to the JVM and the libraries.
The GUI improvements
Since GUI performance is, kind of, resource demanding there has been several
changes in the graphics API’s for this version. For instance, the Java 2D have
made major changes and the most interesting part is that Sun Microsystems in
this release concentrated on the real world and not to benchmark results, which
implies that some earlier version (1.3) may preform faster than this Merlin version but real programs (real world) will improve in speed. This is probably
because benchmarks takes everything in concern whereas a ”real” program implement and uses everything in a certain and different way[20].
The AWT is now rewritten because of the problem with the focus management. This is of course a good thing but also a downside. The good thing is
obvious but the bad thing is that programs developed with earlier versions of
Java may get some unexpected behavior. But this is the only drawback with
the new subsystem.
4.1.5
J2SE Tiger
J2SE Tiger version 1.5.0 is called version 5.0. Version 1.5.0 is used by developers
and 5.0 is used in platform and product names, but are exactly the same. This
is the current stable release at this moment. It was released September 29, 2004
and to compete with Microsoft’s .NET, Sun Microsystems will after this release
ship Java more often than before (18 - 24 months) [22].
Tiger is the biggest release so far and it has a lot of new features as tools
for easier administration and monitoring of Java-applications, simpler RMI interface generation, a new default Java look and more. Tiger is also faster than
earlier versions.
In Java Developer Journal’s interview[24] with Amy Fowler (engineer at Sun
Microsystems), Amy Fowler tells among other things how easy it is to use skins
in an application without knowing anything about pluggable look-and-feel packages.
10
Some other new features in Tiger are:
String performance
One performance enhancement is the StringBuilder class which is a unsynchronized StringBuffer. StringBuilder is much faster than StringBuffer in most implementations. StringBuilder should be used instead of StringBuffer when it’s
used only by a single thread.
Generics
Generic makes type casting safe when handling with a Collection [25]. If a type
cast fails it will generate a java.lang.ClassCastException and the program will
crash (if it’s not throwed). The generics notation is easy to confuse with C++
template. But generics don’t allows template metaprogramming and it will not
create any new class.
Extended for-loop
In this version has the Java developers got weary of writing long and ”ugly”
for-loops. For solving that problem they introduced a for-each-loop, which is an
extended for-loop.[26]
for (String s : c){
System.out.println("Text: "
}
s);
The code ”for (String s : c)” is read as ”for each String s in c”. The Java
Development team recommends to use the for-each-loop as often as you can
because it uses generics and ”beautifies your eyes”.
Enum
The standard way to use enumerated types before this release was to write:
public
public
public
public
public
public
public
static
static
static
static
static
static
static
final
final
final
final
final
final
final
int
int
int
int
int
int
int
DAY_MONDAY = 0; \\
DAY_TUESDAY = 1; \\
DAY_WEDNESDAY = 2; \\
DAY_THURSDAY = 3; \\
DAY_FRIDAY = 4; \\
DAY_SATURDAY = 5; \\
DAY_SUNDAY = 6;
This way is very lengthy and inelegant. With the new Enum pattern it’s possible
to write:
enum Day { MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
FRIDAY, SATURDAY, SUNDAY};
In the example code above it looks it does in C/C++ and C#. But this is
only a simple example of what enum can do. enum is actually a class which
can consists of methods, implements interfaces, etc. Java’s Enum class is very
powerful and is good to use when you have a fixed set of constant.
11
4.2
4.2.1
Future releases
J2SE Mustang (former Dragon/Dragonfly)
The Mustang release is focusing on compatibility and stability but there are
also some new features that have been asked for. Some of the features in this
release is Console (I/O), scripting support and partition-space methods.
Improved console I/O
The new java.io.Console class is a new feature that have been asked for since
1997. Nowadays you can’t write a password without the characters being echoed
and printed in the output console so in this release the new Console-class takes
care of that problem. The Console-class has, among other things, the methods
called readPassword. The readPassword doesn’t echo password characters to the
console output stream. Here is a short example of how to use the Console-class:
To test if the Console device exists you just check to see if the reference is
null[27].
Console console = System.console (); if(console==null)
{
System.err.println ("Console not available");
return;
}
And this is an example to ask the user for a password:
char pwd; do {
Console console = System.console ();
if(console==null) {
System.err.println ("Console not available");
return;
}while (pwd.length < MIN_PWD_LEN);
There are also other functions apart from readPassword, and that is readLine
that will read an entire line from the console and then store it in a String. The
readLine and the readPassword will not throw a IOException as the ordinary
System.io.read() does, instead it throws a IOError. An IOError is a subclass to
Error and will therefore not require a catch[27].
Scripting support
Web Scripting Framework is a optional newcoming feature that makes it possible to run PHP5 and Javascript within the Java platform, but even futher in
the future, the plans is to implement support for several other scripting languages such as BeanShell, Jython, Ruby, and so forth[28]. The main engine is
javax.script.ScriptEngine and is packed and deployed as Jar file and to create
and accessing an script engine is as simple as:
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine jsEngine = manager.getEngineByName("js");
12
Apparently it should be just as easy to use and execute a script since the main
method eval() takes a String or an Reader as parameter that in turn consists
of the actual script. To illustrate the usage, ociweb.com[28] has a simple and
complete example of how to use the Script engine:
//simple script execution
jsEngine.eval("print(’Hello’)");
// bind scripting variables and use in a script
jsEngine.put("a", 3);
Integer b = 2;
jsEngine.put("b", b);
Object retval = jsEngine.eval("c = a b; print(’a
b = ’
c);");
// retrieve the bindings we previously added
Bindings bindings = jsEngine.getBindings(ScriptContext.ENGINE_SCOPE);
boolean containsKey = bindings.containsKey("a");
System.out.println(containsKey);
Results in:
Hello
a b = 5
true
Partition space methods
Another in demand feature is a simple way to get free disk space. The functions
that will be supported and available in Mustange is the getFreeSpace, getTotalSpace and getUsableSpace. The difference of the first two is that the first
function will return a the free space of a specific partition and the other function will return the total size of the hard drive space of a partition. With the
last function you get the available free space of a partition.
Besides all features above Mustang will also include a splashscreen API that
makes it possible to interact and show a picture while the JVM is loading. The
image supported is GIF, JPEG and PNG. The splashscreen is loaded and shown
until a AWT or a SWING window is loaded. The splashscreen will after that
close automatically. To be able to control the splashscreens behavior it includes
3 functions close, getBounds and isVisible. Except for close and isVisible (that
are self explained) the function getBounds return the splash-screen window’s
boundaries[27].
4.2.2
J2SE Dolphin
On Graham Milton’s blog [30] one can read a little bit about how the Java
Platform team will evolve the language. Graham Milton (vice president in that
team at Sun Microsystems) says that will be very conservative on changes in the
language to reduce the complexity. Two of the things that they avoids is to add
a macro preprocessor and AOP (Aspect-Oriented Programming) which breaks
down a program in separated parts for minimizing overlap in functionality.
13
New features in Dolphin will be better acceleration of performance and graphics,
direct support for XML and support for BeanShell (a lightweight Java scripting
language). [29]
InfoWorld writes in an article[33] that Dolphin will be released in the second
half of 2007. Other news sites writes that it will be released during the first
half of 2008. Unfortunately no information directly from Sun Microsystems has
been found.
Since there is no Dolphin project page at Sun Microsystems homepage it’s difficult to know exactly what will be new in the release. It’s also very little
information on public Internet pages.
Graham Milton does even some speculations on Java’s future. He writes that he
think Java will be good in additional 20 - 30 years. After that it will probably
be another language that will take over, which ”of course” runs on the Java
Platform.
5
Current and future licenses
One topic that is very hot right now is the Java licenses. Java’s source code is
available for download, but it’s not under the Open Source Initative (OSI) or
Eclipse Foundation. Many peoples at Sun Microsystems has the opinion that
they will not join the the open-source communities OSI or Eclipse Foundation.
James has said that the license model for Java is very close to open-source and
there is no need for open-source license. But in May 16, 2006 Rich Green said on
JavaONE Conference in San Francisco that Java will now become open-source
[32].
To be certified as Java-compilant today, the software has to pass Technology
Compatibility Kit (TCK) test. Sun Microsystems means that if Java will be
under the open-source agreement it’s a big risk that it will appear incompatible
versions of the Java technology. Sun Microsystems has created a license model
called Java Internal Use License (JIUL) which is made for business and organizations that needs to make changes in Java due to critical problems with their
system [34]. The restriction for this license is that the modified Java code is
only allowed to be used internally in the business or organization. JIUL doesn’t
need to pass the TCK test.
Another license that Sun Microsystems will try to calm down the developers
critism with is Java Distribution License (JDL). JDL is created for commercial
Java development on different operating systems. There is also more licenses
like one that is more GNU/Linux-friendly. But many developers aren’t considered that the current licenses are enough. For instance Brian Stevens at Red
Hat CTO says that if Java vas open-source it could be used in the Nicholas Negroponte’s One Laptop Per Child project, which is a project there one computer
costs $100. Without Java as open source it will impossible to carry out since
only open-source software is allowed, says Brian Stevens.
14
6
Current and future threats
Under the last decade Java has grown and has become one of the most popular
languages over other similar rivals. But things comes and goes and that also
concern new programming languages. There are several ”newcomers” - or at
least older languages that now have changed - that now are similar to Java and
it’s structure. Two of those languages are C#, that is build on .NET architecture.
Microsofts correspondence to Java is C# (C-sharp) that was released in October 2000. To be able to compare C# to Java and try to decide, or at least
give some ideas and thoughts about it, we have to briefly go through C# design
and structure.
To begin with, Microsoft has admit that the invention of .NET was inspired
of the Java structure. Earlier languages from Microsoft such as C or C++ is
compiled directly to machine code (the compiler will output an exe-file). But
with .Net environment all programs are compiled into Microsoft Intermediate
Language (MSIL) which in turn is executed in the Common Language Runtime
(CLR). The CLR is much like JRE and MSIL is Microsoft’s correspondence to
Java’s JVM.
As you can see, the technology is much like Java. The program is first compiled
into MSIL intermediate language and then the CLR uses the MSIL compiler to
convert to the host machine code. Since JVM is available for most of the platforms it’s platform independent, .NET on the other hand is in some way also
platform independent but the problem is that the CLR is actually only written
for Windows platforms. Nowadays there are independent projects that makes
it possible to run and execute .NET programs on other platforms like MAC OS
and such and one of these projects is called Mono. Mono is an open source
project that allow developers to build Linux and other platform applications
with the .NET framework and it includes a CLR engine and libraries.
As already mention, every program that is developed in .NET compiles to MSIL,
that means that code written in VB.NET can be reused in C# and this reusability makes the .NET environment powerful. This feature is something that is
missing in Java.
James Gosling (Mr Java) is not that impressed since he totaly dismissed Microsoft’s C#: ”We were afraid they were going to do something really creative but they’re hopelessly focused on one platform.”[2]
7
Conclusion
Because of Java is platform independent and has an easy programming language
it is very popular and useful. When reading about Java’s new release features
it’s easy to see that Java are getting more functionalities, quicker execution
and more reliable for each new release. Even if Sun Microsystems makes Java
software to run faster it’s still a long way to go before it can be used in real
15
time-critical systems.
Our experience with Java programs memory usage and execution speed is that
it’s in most cases much more ineffective than in programs written in e.g. C++
and C#. Compared with C++, Java has the a big advantage for easy creation
of graphics, since the programmer doesn’t have to know exactly how the graphic
components works. Graphics in C# is much like Java and both are very easy
to use and to create graphics user interface, but C# has the disadvantage that
is not platform independent (sort of).
The pressure from Microsoft’s .NET has resulted in that Sun Microsystems
have decided to release the JDK’s versions more frequently. Presumably this
competition will speedup the development a further more.
Our opinion is that it’s strategically good to reduce the time between each
Java release to fully and seriously compete with the functionality from other
programming languages. But it can also be a negative side effect that will appear in more bugs and other drawbacks that can appear if the time is reduced.
Sun Microsystems has in all years declared that Java will not be open-source,
but the pressure from software developers and vendors was (and is) so strong
that Sun Microsystems finally said that they will release Java under open-source.
Concerning the licenses we think that it’s very important that Sun Microsystems makes Java open-source to get more even more popular, especially now
when .NET has become a bigger threat. We think that Sun Microsystems will
get advantage to other programming languages if it can be implemented freely
in e.g. operating systems. But it’s also a risk to make it open-source if it can
be freely used due to incompatibility between different Java versions.
16
References
[1] Sun Microsystems, JAVASOFT SHIPS JAVA 1.0
http://www.sun.com/smi/Press/sunflash/199601/sunflash.960123.10561.xml, last visited 2006-05-06
[2] News.com, Microsoft plays both sides of Java
http://news.com.com/Microsoft+plays+both+sides+of+Java/21001001 3-201233.html, last visited 2006-05-06
[3] Microsoft, Microsoft Announces, Demonstrates Application Foundation
Classes Comprehensive Set of Cross-Platform Class Libraries for Java
http://www.microsoft.com/presspass/press/1997/jan97/iacmompr.mspx,
last visited 2006-05-16
[4] Sun Microsystems, SUN SHIPS JDK 1.1 – JAVABEANS INCLUDED
http://www.sun.com/smi/Press/sunflash/199702/sunflash.970219.0001.xml, last visited 2006-05-05
[5] JavaSoft/Sun Microsystems, JDBC: A Java SQL API
http://java.sun.com/products/jdbc/jdbc-spec-0120.pdf, last visited 200605-16
[6] Sun Microsystems, Archive: Java Platform 1.1 API and Documentation,
http://java.sun.com/products/archive/jdk/1.1/, last visited 2006-05-04.
[7] Shahrooz Feizabadi, Archive: History of the World Wide Web,
http://ei.cs.vt.edu/ wwwbtb/book/chap1/java hist.html, last visited 200605-04.
[8] The code project, The Common Language Runtime (CLR) and Java Runtime Environment (JRE) ,
http://www.codeproject.com/dotnet/clr.asp, last visited 2006-05-04.
[9] media.wiley.com, Foundations of Java,
http://media.wiley.com/product data/excerpt/2X/07821402/078214022X.pdf,
last visited 2006-05-04.
[10] java.sun.com, Learn About Java Technology,
http://www.java.com/en/about/, last visited 2006-05-04.
[11] Java.com, JAVA TECHNOLOGY: THE EARLY YEARS ,
http://java.sun.com/features/1998/05/birthday.html, last visited 200605-04.
[12] Sun Microsystems, SUN DELIVERS NEXT VERSION OF THE JAVA
PLATFORM,
http://www.sun.com/smi/Press/sunflash/199812/sunflash.981208.9.xml, last visited 2006-05-10.
[13] Java World, What’s new in the JDK ,
http://www.javaworld.com/javaworld/javaone98/j1-98-jdk.html, last visited 2006-05-10.
17
[14] Java World, Archive: Java Platform 1.1 API and Documentation,
http://www.javaworld.com/javaworld/jw-08-1997/jw-08-hood.html,
visited 2006-05-10.
last
[15] Java World, Security Features Overview,
http://java.sun.com/docs/books/tutorial/security1.2/overview/index.html,
last visited 2006-05-10.
[16] Sun Microsystems, SUN MICROSYSTEMS RELEASES FASTEST
CLIENT-SIDE JAVA PLATFORM TO DATE
http://www.sun.com/smi/Press/sunflash/200005/sunflash.20000508.3.xml, last visited 2006-05-16
[17] Sun Microsystems, Sound
http://java.sun.com/j2se/1.3/docs/guide/sound/, last visited 2006-05-16
[18] Sun Microsystems, J2SE 1.3.1 Reference Documentation,
http://java.sun.com/j2se/1.3/docs.html, last visited 2006-05-04.
[19] http://www.cafeaulait.org, The Java Gated Community Process,
http://www.cafeaulait.org/editorials/jcp.html, last visited 2006-05-10.
[20] JavaWorld, Enter Java 1.4 Merlin beta ,
http://www.javaworld.com/javaworld/javaone01/j1-01-sintes1.html, last
visited 2006-05-10.
[21] Sun Microsystems, The AWT Focus Subsystem,
http://java.sun.com/javase/6/docs/api/java/awt/docfiles/FocusSpec.html, last visited 2006-05-04.
[22] Builder UK, Sun takes the covers off Mustang
http://uk.builder.com/0,39026540,39253479,00.htm, last visited 2006-0504.
[23] Sun Microsystems, JDK 5.0 Documentation
http://java.sun.com/j2se/1.5.0/, last visited 2006-05-04.
[24] Java Developers Journal, Java Trends - Exclusive Interview with Amy
Fowler
http://java.sys-con.com/read/44701.htm?CFID=121167&CFTOKEN=11CBE15D7463-149C-AD361572FC851959, last visited 2006-05-18.
[25] Sun Microsystems, Generics
http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html, last
visited 2006-05-16.
[26] Sun Microsystems, The For-Each Loop
http://java.sun.com/j2se/1.5.0/docs/guide/language/foreach.html,
visited 2006-05-16.
last
[27] javaworld, Start saddling up for Mustang,
http://www.javaworld.com/javaworld/jw-01-2006/jw-0109-mustang.html,
last visited 2006-05-10.
18
[28] Java News Brief , Scripting Support in Mustang,
http://www.ociweb.com/jnb/jnbFeb2006.html, last visited 2006-05-10.
[29] IDG International, Sun lays out Java road maps,
http://www.idg.se/international/includes/internationalnews/internationalNewsArticles.asp?IntNewsID
last visited 2006-05-18
[30] Graham Milton, Graham Hamilton’s Blog: Evolving the Java Language,
http://weblogs.java.net/blog/kgh/archive/2004/09/evolving the ja.html,
last visited 2006-05-15
[31] InfoWorld, Dolphin release of Java swimming into view,
http://www.infoworld.com/article/05/05/17/HNdolphin 1.html, last visited 2006-05-15
[32] News.com, Video: Sun set to offer Java to open-source community,
http://news.com.com/1606-2-6072875.html?tag=st.rb, last visited 200605-20
[33] Techworld, Gosling says no to open-source Java,
http://www.techworld.com/opsys/news/index.cfm?newsID=5990&pagtype=all,
last visited 2006-05-20
[34] Java.net, JAVA INTERNAL USE LICENSE,
http://www.java.net/jiul.csp, last visited 2006-05-20
19