Migrate to Java Platform, Standard Edition (Java SE) 6
WAS ND V7.0 supports the Java SE 6 specification.
Begin the transition from deprecated functions.
The following JSRs are new in Java SE 6:
JSR 105: XML Digital Signature APIs
JSR 173: Streaming API for XML (StAX)
JSR 181: Web Services Metadata
JSR 199: Java Compiler API
JSR 202: Java Class-File Specification Update
JSR 221: Java DataBase Connectivity (JDBC) 4.0
JSR 222: JAXB 2.0
JSR 223: Scripting for the Java Platform
JSR 224: JAX-WS 2.0
JSR 250: Common Annotations
JSR 269: Pluggable Annotation-Processing API
The new JVM adds...
- interfaces for integrating the Java and scripting languages
- password prompting
- file input-output enhancements
- parsing of streaming XML documents
Although bundled with WAS ND V7 as part of the JDK and the IBM SDK V6, JConsole is not supported.
- Determine whether to use the default just-in-time (JIT) mode.
For Java SE 6, the default JIT mode for the Solaris virtual machine depends on the hardware configuration. It is not always client. With Java SE 6, for server class hardware (meaning 2+ CPU and greater than 2 GB RAM), the virtual machine automatically switches to server JIT mode.
To configure the -server or -client parameter to the liking, set the generic JVM arguments of the server process definition.
- Decide whether to take advantage of new Java SE 6 capabilities in the applications.
We can deploy applications using Java SE 6 features only to V7 nodes, as earlier product versions do not provide the Java SE 6 virtual machine.
Applications that access classes and APIs internal to the JVM might produce errors. These classes and APIs are not covered by the Java SE 6 spec and are therefore subject to change. Packages with prefixes such as...com.sun.*
...are considered internal.
Direct use of implementations of XML and XSL parsers is strongly discouraged, such as direct use of Xerces and Xalan classes that provide the JAXP implementation for the JVM.
The direct parser APIs also are considered internal and subject to change. Applications should rely only on the JAXP APIs defined in the Java SE 6 API documentation.
If the application requires a specific version of Xerces or Xalan, or some other XML/XSL parser package, then embed the parser within...
...and set the appropriate class loading mode in the application deployment so that for the application the XML parser APIs are loaded from the application class path, not the JVM bootstrap class path. Failure to follow this guideline can cause significant errors when you try to migrate to a new Java SE 6 level.
- Compile Java SE 6 applications to run on previous Java virtual machine levels by setting the compiler modes.
When compiling applications that are built with Java SE 6 that are intended for running on previous specifications, specify -source and -target modes for the Java SE 6 compiler. Doing so ensures that the bytecode generated is compatible with the earlier JVM.
For example, if the target JVM is at 1.4.2 level, when you compile applications with Java SE 6, you should specify -source 1.4, and target 1.4 to generate bytecode compatible with 1.4.2. This does not handle the usage of packages, classes, or functions new to Java SE 6. It only addresses bytecode output. Developers must take care in what APIs they are using from the J2SE packages if they intend to run the application on multiple JVM specification levels.
- Java SE 6 is upwards binary-compatible with Java 2 Technology Edition, V5.0 and Java 2 Technology Edition, V1.4.2, except for some incompatibilities
- Transition from deprecated JVMDI and JVMPI to JVMTI.
JVMDI and JVMPI were deprecated in J2SE 5.0. They have been removed from Java SE 6.
- Update the use of the Java command line interface.
The command-line interfaces for the Java SE 6 level have not changed extensively from J2SE 5, although they vary among virtual machine vendors. We can find them in...
Here are some notable JVMTI command line options...
-agentlib Load a native agent library. -agentpath Native agent library full path name. -javaagent Load the Java agent. See java.lang.instrument.
See apt -help for information about the new command line supporting annotations.
See javac -help for information and updates to that command line.
- Update ANT tasks.
If we have created ANT tasks based on the idltojava ANT task shipped with prior versions of this product, ensure that it passes the proper parameters for Java SE 6 as it does for J2SE 1.4 or 5, to ensure the stubs, ties and skeletons that it generates are compatible with earlier product releases.