This product version supports the Java™ Platform,
Standard Edition (Java SE) 8 specification. Its Java virtual machine provides a Java language compiler and runtime environment. Decide whether your new and existing
applications will take advantage of the capabilities added by Java SE 8, and begin the transition from deprecated functions.
About this task
Java SE 8 includes new features such as Lambda expression
support and virtual extension methods, a more understandable date and time API, and improved
security. Java SE 8 offers support for WebSphere® applications to use the latest available Java features and standards. For more information about new Java features, see What's new in Java 8 on the Oracle
website.
Support for Java SE 8 is provided by the IBM® SDK, Java Technology Edition, Version 8. For information about what is new in IBM SDK, Java Technology Edition, Version 8, see IBM SDK, Java Technology Edition, Version 8.
Procedure
- Decide whether to take advantage of new Java SE 8
capabilities in your applications.
You can deploy applications using Java SE 8 features only
to Version 9.0 or Version 8.5.5.9 or later nodes, as earlier
product versions do not provide the Java SE 8 virtual
machine.
- Compile Java SE 8 applications that do not use new
capabilities to run on previous Java virtual machine levels by
setting the compiler modes.
When compiling applications that are built with Java SE 8
that are intended for running on previous specifications, specify -source and
-target modes for the Java SE 8 compiler.
Doing so ensures that the bytecode generated is compatible with the earlier Java virtual machine.
For example, if the target Java virtual machine is at 1.6
level, when you compile applications with Java SE 8, you
should specify -source 1.6, and -target 1.6 to generate bytecode
compatible with 1.6. This does not handle the usage of packages, classes, or functions new to Java SE 8. It only addresses bytecode output. Developers must take care in what APIs they are using from the Java SE packages if they intend to run the application on multiple Java virtual machine specification levels.
- Address incompatibilities in previously compiled Java SE
applications.
Java SE 8 is upwards binary-compatible with previous Java SE versions, except for the incompatibilities and
deprecations that are documented in the Oracle Compatibility Guide for JDK 8.
Best practice: Rather than manually looking through your applications for API and
specification changes, scan your applications for any required changes by using the Migration
Toolkit for Application Binaries and the WebSphere Application Server Migration Toolkit.
The
application binary scanner provides a detailed migration analysis report for your application, so
you can better understand the type and scope of changes that the application might require. When you
migrate your applications, the Eclipse-based migration toolkit provides quick fixes to automatically
update your source when possible and provides detailed help for items that must be manually
updated.
For more information and to download the toolkit, see the Migration
Toolkit on WASdev.
bprac