Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
New Features and Enhancements Java 2 Platform Accessibility  Previous   Contents   Next 
   
 

Regular Expressions

The new package java.util.regex contains classes for matching character sequences against patterns that are specified by regular expressions. For details, see the API specification for java.util.regex at http://java.sun.com/j2se/1.4/docs/api/java/util/regex/package-summary.html.

Math

A new, efficient method for generating prime numbers with no need for the caller to specify a certainty has been added to class java.math.BigInteger. For more information, see http://java.sun.com/j2se/1.4/docs/guide/math/enhancements14.html.

Reflection

Certain reflective operations, specifically java.lang.reflect.Field, java.lang.reflect.Method.invoke(), java.lang.reflect.Constructor.newInstance(), and Class.newInstance(), have been rewritten for higher performance. Reflective invocations and instantiations are several times faster than in previous releases. For more information, see http://java.sun.com/j2se/1.4/docs/guide/reflection/index.html.

Java™ Native Interface

The Java Native Interface (JNI) has been enhanced in J2SE 1.4 to reflect a new feature of the java.nio package: direct buffers. The contents of a direct buffer can, potentially, reside in native memory outside of the ordinary garbage-collected heap. Also, new Invocation Interface routine AttachCurrentTreadAsDaemon allows native code to attach a daemon thread to the virtual machine; this is useful when the VM should not wait for this thread to exit upon shutdown. See JNI Enhancements online at http://java.sun.com/j2se/1.4/docs/guide/jni/jni-14.html.

Tools and Utilities

See also the Tools Changes online documentation at http://java.sun.com/j2se/1.4/docs/tooldocs/tools-changes.html.

  • The java application launcher supports command-line options for support of the new Assertions Facility. On the Solaris™ Operating Environment (SPARC™ Platform Edition) new command-line options are available for specifying 64-bit or 32-bit operation. New option -Xloggc:file logs each garbage-collection event in the specified file. New option Xcheck:jni() performs additional checks for Java Native Interface (JNI) functions at the cost of some performance degradation.

  • The javadoc tool has several new tags, a dozen new options, smarter inheriting of doc comments, more control over HTML output, improvements to the doclet API, better error messages, dozens of bug fixes, and is easier to run. For more details, see What's New in Javadoc 1.4 online at http://java.sun.com/j2se/1.4/docs/tooldocs/javadoc/whatsnew-1.4.html. Downloadable as a separate product, the MIF doclet http://java.sun.com/j2se/javadoc/mifdoclet) has had a major upgrade -- it generates API documentation in FrameMaker and PDF format.

  • The native2ascii tool contains bug fixes to process source files encoded with Unicode encoding correctly.

  • The idlj tool now generates server-side bindings following the Portable Servant Inheritance Model. This change involves producing new POA bindings by default. A new command-line option is added to enable you to continue to generate backwards-compatible server-side bindings. To learn more about the Portable Servant Inheritance Model, see http://java.sun.com/j2se/1.4/docs/guide/idl/POA.html. For more information on the idlj tool, see http://java.sun.com/j2se/1.4/docs/guide/rmi-iiop/toJavaPortableUG.html.

  • The orbd tool, or Object Request Broker Daemon, is a new alternative tool for the Transient Naming Service, tnameserv. ORBD includes both a Transient Naming Service and a Persistent Naming Service. The orbd tool is used to enable clients to transparently locate and invoke persistent objects on servers in the CORBA environment. The orbd tool incorporates the functionality of a Server Manager, an Interoperable Naming Service, and a Bootstrap Name Server. When used in conjunction with the servertool, the Server Manager locates, registers, and activates a server when a client wants to access the server. For more information, see http://java.sun.com/j2se/1.4/docs/guide/idl/orbd.html.

  • The servertool is new to J2SE 1.4. The servertool provides an ease-of-use interface for application programmers to register, unregister, startup, and shutdown a server. For more information, see http://java.sun.com/j2se/1.4/docs/guide/idl/servertool.html.

  • The rmic compiler has a new option to enable Portable Object Adapter, or POA, support for Remote Method Invocation. The POA enables portability among vendor ORBs, among other uses. To learn more about the POA, see http://java.sun.com/j2se/1.4/docs/guide/idl/POA.html. To enable POA support with the rmic compiler, use the arguments rmic -iiop -poa. For more information on the rmic compiler, see http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/rmic.html.

  • The graphicalPolicy Tool utility has been enhanced to enable specifying a Principal field indicating what user is to be granted specified access control permissions.

 
 
 
  Previous   Contents   Next