Cell Phones
Pagers
Alarm Watches
etc.
and set your notebook's volume to zero
Java was a fluke
Intended for set-top device markets
First release
Pushed out door early
Lots of mistakes:
Inflexible Event model
Not easily internationalizable
Object oriented impurities (e.g. integer constants)
Thread unsafe:
stop()
and suspend()
could leave objects in inconsistent states
double
and long
operations weren't guaranteed atomic
Relied on third parties for ports:
Netscape
Microsoft
Apple
Lots of new APIs:
JDBC
RMI
Readers and Writers
Delegation Event Model
JavaBeans
Security architecture changed completely
Lots of mistakes were deprecated
Focused on adding new libraries; relatively little deprecation
Standard extension mechanism is invented
along with the the javax
package.
Swing
Security architecture changed completely
Java Collections API
Java 2D
HotSpot
Various versions split off:
J2EE
J2ME
Focused on adding new libraries; relatively little deprecation
New APIs:
Java Naming and Directory Interface
RMI/IIOP
Java Sound
Java Platform Debugger Architecture
Linux becomes a first class platform
HotSpot gets better
Security architecture changed completely
Primary focus is on bugs and performance
New features mostly aimed at "enterprise class Java applications"; in particular
Reliability
Serviceability
Scalability
Performance
Deployment
Relatively little deprecation
In private beta now, public beta soon
Ships sometime in 2001
Security architecture changed completely (Is the fifth time the charm?)
Not everything I'm talking about will make it in
Assertions
Concise array literals
Generics, a.k.a templates
Operator Overloading
Multiple Inheritance
Primitive data types become full objects
An assertion is a statement containing a boolean expression that the programmer believes will be true every time the statement is executed when the program runs.
For example,
int i = in.read();
assert i >= -1 && i <= 256;
If an assertion fails at runtime an AssertionError
is thrown.
Typically, assertion-checking is enabled during program development and testing, and disabled for deployment. Therefore assertions should not have side effects.
Assertions should not be used to check arguments to public methods; (instead regular logic should be used and an exception thrown if there's a problem) but of course this is exactly what programmers will use them for.
Introduces a number of backwards compatibility issues because of the
new keyword and ClassLoader
changes required to support assertions.
Possibly included in Java 1.4; RFE "fixed in a non-public release"
http://java.sun.com/aboutJava/communityprocess/review/jsr041/publicDraft.html
Needed for printf()
like formatting
(replaces variable length argument lists
Possibly a good idea.
An example:
public static void main(String[] args) {
double result = sum({1.2, 2.4, 3.5, 4.9});
System.out.println(result);
}
public static double sum(double[] x) {
double sum = 0.0;
for (int i = 0; i < x.length; i++) {
sum += x[i];
}
return sum;
}
}
Probably a good idea.
An example adapted from the GJ Tutorial by Gilad Bracha, et al:
interface Collection<A> {
public void add(A x);
public Iterator<A> iterator();
}
interface Iterator<> {
public A next();
public boolean hasNext();
}
class LinkedList<A> implements Collection<A> {
protected class Node {
A elt;
Node next = null;
Node (A elt) { this.elt=elt; }
}
protected Node head = null
protected Node tail = null;
public LinkedList () {}
public void add (A elt) {
if (head==null) { head=new Node(elt); tail=head; }
else { tail.next=new Node(elt); tail=tail.next; }
}
public Iterator<A> iterator () {
return new Iterator<A> () {
protected Node ptr=head;
public boolean hasNext () { return ptr!=null; }
public A next () {
if (ptr!=null) {
A elt=ptr.elt; ptr=ptr.next; return elt;
}
else {
throw new NoSuchElementException ();
}
}
};
}
Undocumented support for this in Java 1.3!
All the tricks are in the compiler; doesn't change the byte code at all.
May be documented for Java 1.4
Pushed by James Gosling, Guy Steele and the Java Grande group
Probably not in Java 1.4
A bad idea in any case
Not now, not ever
Interfaces are all you need
A bad idea in any case
Why can't you store an int
in a
Vector
?
Why can't you call toString()
on a
double
?
Why does 2,147,483,647 + 2,147,483,647 equal -1?
Not now, not ever
Probably a good idea that will have to wait for the next language
The Copyable
interface
Chained Exceptions
JAR archives
AWT/Swing
Internationalization
I/O
Networking
JDBC
JNDI
RMI
Applets
Security
public interface Copyable {
public Object clone(); // guarantees deep clone
}
Unanswered questions:
Should it extend Cloneble
?
How to enforce the semantics of a deep copy?
Allow one exception to wrap another; for instance by providing
public void setNestedException(Throwable t)
public Throwable getNestedThrowable()
Throwable
class.More heavily compressed dense jar files.
Writable jar archives
Headless systems
Better file dialogs:
Alias/shortcut support
Desktop at root
Remove filename extensions
Other more Windows-like abilities
Non-String data on the system (non-Java) clipboard
Windows 2000 Look and Feel
Macintosh menu bar finally goes to the top of the screen
Possibly a Swing spinner component
Perhaps support for mouse wheels
Thai locale
Hindi locale
The
character set converters
in the undocumented sun.io
package will be moved to a public API.
Unicode 3.0 will be supported including surrogate pairs.
Asynchronous and/or polling I/O
Memory mapped or otherwise buffered I/O
printf()
like formatting. For example,
Formatter f = new Formatter(System.out);
f.fmt("%d bytes in %d seconds (%.2f KB/s)\n",
{ nbytes, seconds, ((double)(nbytes / 1024) / (double)seconds)) };
Regular expressions
More details about the file system and file types should be exposed through the Java API; for example, the file permissions and ownership info.
More detailed IOExceptions
Passive mode FTP
IPv6 if the host platform supports it
URLDecoder
and URLEncoder
can handle
different character sets with UTF-8 as the default.
Let users create and use their own socket factories
Make Java Secure Socket Extension (JSSE) part of the standard, core API
Still no direct access to the IP layer
Bundle the entire JDBC; no longer split it between standard parts and extensions
Add parts of the Java Transaction API required for full JDBC
Support disconnected rowsets
DNS Service Provider
Directory Services Markup Language Service Provider
Support for GSS-SPNEGO/Kerberos V5 SASL mechanism
Custom remote references. It's not just unicast anymore!
Better control over codebase annotation of classes
Better security manager
Java Plug-In becomes standard means of supporting applets
Support for Netscape 6.0 Open Java Interface on Mac, Windows, and Linux
Java Plug-In user interface much improved
Make the Java Authentication and Authorization Service (JAAS) a part of the core API so applications can authenticate based on whose running the code.
Move the Java Cryptography Extension (JCE) into the core API, but use code signing to prevent non-U.S. friendly countries from using strong encryption. (See Who Trusts the Trustees? Trusted Security Providers in the Java Cryptography Extension 1.2.1)
Add the Certification
Path API (java.security.certpath
)
to support certificate chains
Support Generic Security Service API Version 2: Java Bindings; i.e. Kerberos
Support RSA's PKCS (Public-Key Cryptography Standards)
Preferences API
Logging API
Installer API
A simple API for managing user preference and configuration data
Allows recording of key events to a file or a network service, especially when errors are encountered.
java.util.logging
According to the JSR:
It will be possible to enable or disable logging at run-time.
It will be possible to control logging at a fairly fine granularity, so that logging can be enabled or disabled for specific functionality.
The logging APIs will allow registration of logging services at run time, so third parties can add new log services.
It will be possible to provide bridging services that connect the Java logging APIs to existing logging services (e.g. operating system logs).
Where appropriate, the logging APIs will also support displaying high-priority messages to end users.
Much needed
Not yet in JSR
XML
Remote Monitoring
Failover and Clustering
Java WebStart
An XML parser will be bundled with the JDK, probably Sun's Crimson
DOM Level 1
JAXP
Probably SAX 2.0
Probably DOM Level 2
Longshot: JDOM
Possibly XML Data Binding
Perhaps XML doclet for JavaDoc
Possibly XSLT
Provide a subset of the debugging and profiling information from JVMDI and JVMPI (Java VM debugging and profiling interfaces) to trusted, authenticated clients.
This one's a maybe; not at JSR yet.
Support service provided by multiple redundant servers
Another maybe; not at JSR yet.
javax.jnlp
Deploy secure applications from the Web
Applications are locally cached and updated automatically
Applet-like security manager.
However, you can read and write files the user explicitly chooses
Apple
Microsoft
Open Source
Installed Base of Macs will never hava Java 1.2
Mac OS X includes JDK 1.3
Mac OS X's preferred language is Java
Dropping Java more or less completely
Will never advance between 1.1.4
C#
Transvirtual Technology's Kaffe is a "complete, PersonalJava 1.1 compliant Java environment." but is a couple of years behind the closed-source alternatives.
Many standard extensions have open source implementations. For instance, Cryptix has written an open source implmentation of the Java Cryptography Extension.
JSR-59, Merlin Feature List: http://java.sun.com/aboutJava/communityprocess/review/jsr059/index.html
Java Community Process: http://java.sun.com/aboutJava/communityprocess/
This presentation: http://www.ibiblio.org/javafaq/slides/ukuug/javafuture/