Tuesday Apr 15, 2014

JDK 8u5 and JDK 7u55 Documentation Updates

The Java Development Kit 8 Update 5 (JDK 8u5) and JDK 7u55 releases are available and can be downloaded from the Java SE Downloads page. For information about these releases, see the JDK 8u5 Release Notes and the JDK 7u55 Release Notes.

JDK 8u5 and 7u55 enhancements include the following:

  • The frequency of some security dialogs has been reduced on systems that run the same Rich Internet Application (RIA) multiple times.
  • If a stand-alone asterisk (*) is specified as the value for the Caller-Allowable-Codebase attribute, then calls from JavaScript code to RIA will show a security warning, and users have the choice to allow the call or block the call. For more information, see JAR File Manifest Attributes for Security (or the JDK 7 version of this section).

Java EE 7 Tutorial Updated!

The latest update to the Java EE 7 Tutorial is now public. Update 7.0.4 includes many bug fixes, both in the examples and in the documentation. Although most of these fixes were small, taken together they significantly improve the quality of the tutorial.

Kin-man Chung conducted a thorough review and provided several corrections and good suggestions that we incorporated to greatly improve Chapter 9, Expression Language.

Additional instructions for using the user and administrative interfaces in Duke's Tutoring case study were added.

We went through all of the examples and cleaned up the code to minimize warnings that you could see when you ran the examples or used the IDE's code editor to examine the files that made up the examples.

We verified that all of the examples work properly with the latest versions of JDK 7, JDK 8, and NetBeans IDE 8.0.

We incorporated the copy edits that came back from our publisher, so what you see online will match what you see in the two-volume printed set that will be available from your favorite booksellers next month.

Follow the instructions in Section 2.1, Required Software to obtain and install the update.

Tuesday Mar 25, 2014

Learn More About Compact Profiles

Compact Profiles contain predefined subsets of the Java SE platform and enable applications that do not require the entire platform to be deployed and run on small devices. Developers can choose the appropriate profile based on the resources of the target hardware. The following profiles are available in Java SE 8:

  • compact1: Smallest set of API packages without omitting classes. Logging and SSL are included. See Profile compact1 for a list of the packages, classes, and interfaces that are included.

  • compact2: Includes everything in compact1 plus XML, JDBC and RMI. See Profile compact2 for a list of the packages, classes, and interfaces that are included.

  • compact3: Includes everything in compact2 plus management, naming, more security, and the compiler API. See Profile compact3 for a list of the packages, classes, and interfaces that are included.

For more information about compact profiles, see the following resources:

See What's New in JDK 8 for information about other new features in JDK 8.

Learn More About Java Type Annotations

Java SE 8 brings a variety of improvements to the "metadata" features of the Java language and libraries. Annotations are more flexible and useful than ever. Annotations can now be applied anywhere a type is used, which enables stronger type checking of your code, and the same annotation type can be applied more than once to the same declaration or type use. It is also now possible to reflect over the names of method parameters.

For more information about annotations and reflection, see the following resources:

See What's New in JDK 8 for information about other new features in JDK 8.

Learn More About the Date-Time API

JDK 8 includes a new Date-Time API based on JSR 310. This API provides a comprehensive date-time model that enables you to represent dates and times and manipulate date and time values. It supports the International Organization for Standardization (ISO) calendar system as well as other commonly used global calendars. Classes in the java.time package replace the Date, Calendar, TimeZone, and DateFormat classes in the java.util package.

For information about the Date-Time API, see the following resources:

  • The Date-Time Trail of the Java Tutorial covers the classes based on the standard ISO calendar system, and includes information about migrating from the java.util date classes to the new java.time API.

  • The API documentation for the Date-Time API describes the classes and methods that are available.

  • The screencast A New Date and Time API - JSR 310 by Stephen Colebourne provides an overview of the API, explaining the core concepts and classes, and enables you to dive straight in when it is time to code.

  • Java 8 Launch has screencasts that describe the feature.

See What's New in JDK 8 for information about other new features in JDK 8.

Learn More About Lambda Expressions

Java SE 8 introduced Lambda Expressions, a powerful new behavior abstraction feature that enables code to be passed around as data. Lambda expressions make your code easier to read, easier to maintain, and less prone to error. Lambda expressions make it possible to express a problem with a higher level of abstraction than was previously possible. Use Lambda Expressions to eliminate large chunks of "boilerplate" code (such as when using inner classes to express behavior), and accomplish more work in less lines of code.

For more information about Lambda Expressions, see the following resources:

See What's New in JDK 8 for information about other new features in JDK 8.

Learn More About Performance Improvements in JDK 8

Each release of the JDK includes enhancements that improves the performance of the Java platform. The following describes some of these enhancements in JDK 8:

  • The concurrent libraries have undergone a major revision to improve scalability. See Concurrency Utilities Enhancements in Java SE 8.
  • Tiered Compilation, which was introduced in JDK 7, has been enabled by default and brings server VM startup speeds close to or on par with the client VM. For details on how to control the compiler, see the documentation for the java command.
  • Permament generation, where the VM stored internal native data structures, such as class information, has been replaced with metaspace. Metaspace eliminates java.lang.OutOfMemoryError: PermGen space errors. The java command introduces the option -XX:MetaspaceSize, which sets the maximum amount of native memory that can be allocated for class metadata. By default, the size is not limited. In addition, the experimental option -Xshare has been introduced, which reduces footprint and startup time by sharing loaded JDK classes between all Java processes on the same host.
  • The Nashorn JavaScript engine dramatically improves upon the performance of the JDK 7 JavaScript engine.
  • The new language feature Lambda expressions performs better than inner classes.
  • The performance of JavaFX has been improved in JDK 8.

See the Java 8 Launch Webcast and What's New in JDK 8 for additional information of other new features in JDK 8.

Download JDK 8 today and try it out!

Learn More About Security Enhancements in Java SE 8

Oracle constantly works on improving the security of the Java platform. The following security enhancements are new for JDK 8; see JDK 8 Security Enhancements for more details:

  • Client-side TLS 1.2 (an industry standard) enabled by default; improves security of data in transit; see the Protocols section of the SunJSSE Provider and Customizing JSSE
  • Enhanced support for certification revocation checking; it enables the Java community to better police their own certificates; see Check Revocation Status of Certificates with PKIXRevocationChecker Class
  • New tool, jdeps, Java class dependency analyzer, identifies external dependencies that may negatively impacting your applications' ability to upgrade to the latest security patches
  • Type Annotations help ensure that your data is consistent with your requirements
  • SSL/TLS Server Name Indication (SNI) Extension is a TLS extension to support virtual hosting environments; previously, HTTPS servers could not be hosted in a virtual hosting infrastructure where multiple domains share the same IP address; see Server Name Indication (SNI) Extension
  • High entropy random number generation; see SecureRandom section of the JCA Reference Guide and the SecureRandom API Specification
  • The cryptographic algorithms in JDK 8 have been enhanced with the SHA-224 variant of the SHA-2 family of message-digest implementations
  • Support for NSA Suite B cryptography has been enhanced
  • The PKCS 11 provider support for Windows has been expanded to include 64-bit
  • Overhauled JKS-JCEKS-PKCS12 Keystore

Many recent improvements focus on limiting attackers from using malicious applets and Rich Internet Applications (RIAs), which have been added in JDK 7 update releases and critical patch updates (CPUs) and in JDK 8. These improvements are described in Java Rich Internet Applications Enhancements in JDK 7, which include the following:

  • Ability to set the security level of the Java client in the Java Control panel
  • Ability to disable any Java application from running in the browser
  • JREs have an expiration date; JREs will behave differently after their expiration date, which encourages upgrades; see JDK 7u10 Release Notes
  • Expanded blacklisting support, which includes a certificate and jar blacklist repository maintained by Oracle; see JDK 7u21 Release Notes
  • Recommendation that all applications be privileged (previously called "signed" applications); otherwise, applications are restricted to the security sandbox
  • By default, all certificates are checked using both OCSP and CRLs
  • New JAR file manifest attributes to defend RIAs against unauthorized code repurposing
  • Deployment Rule Set feature enables an enterprise to establish a whitelist of known applications; applications on the whitelist can be run without most security prompts
  • Ability for enterprises who manage their update process to disable checking of JREs if they are expired or below the security baseline
  • Exception Site List feature provides a way for users to run Java applets and Java Web Start applications that do not meet the latest security requirements

Milton Smith has presented the screencast Java 8 Security Highlights during the Java 8 Launch Webcast, which discusses these enhancements.

See What's New in JDK 8 for additional information of other new features in JDK 8.

Download JDK 8 today and try it out!

Learn More About New Features in Java SE 8

Java SE 8 introduces significant enhancements to the Java language and class libraries. These enhancements enable you to make code more concise without losing readability; write more reliable code; better utilize multi-core and multi-processor systems (code is no longer inherently serial or parallel); and detect more errors at compile time, rather than at run time.

See What's New in JDK 8 and JDK 8 Adoption Guide for more detailed information on these new features and how to adopt them.

Learn more about these features with the following links from Java SE 8 Technical Documentation:

  • Java Language Enhancements
    • Lambda Expressions enable you to treat functionality as a method argument, or code as data. They are similar to closures and provide more concise anonymous function types and a more functional style of programming.
    • Default Methods (or Extension Methods) provide a mechanism to add new methods to existing interfaces.
    • Type Annotations provide the ability to apply an annotation anywhere a type is used, not just on a declaration.
    • Improved Type Inference enables the Java compiler to takes advantage of target typing to infer the type parameters of a generic method invocation. The target type of an expression is the data type that the Java compiler expects depending on where the expression appears.
    • Obtaining Names of Method Parameters shows you how to retrieve parameter names of methods and constructors (not just types and return types) by reflection.
  • Core Libraries Enhancements
  • Java Virtual Machine Enhancements
    • Nashorn is a lightweight, high-performance JavaScript engine, which is integrated into the JRE.
    • java command lists deprecated and removed options as a result of the retirement of rarely used garbage collection combinations and the removal of permanent generation

Simon Ritter has presented the screencast New Features in Java SE 8: A Developer's Guide during the Java 8 Launch Webcast, which discusses these features.

Download JDK 8 today and try it out!

Monday Mar 24, 2014

Learn More About Streams and Collections

Lambda Expressions are a major new language feature introduced in Java SE 8. Related to that change are the Streams API and Aggregate Operations on Collections. The Collection interface now exposes methods Stream<E> stream() and Stream<E> parallelStream(), for obtaining sequential or parallel streams from an underlying collection.

Here's a quick example showing how this new API (with Lambda Expressions) would be used in place of a traditional Iterator or for loop. It obtains a stream from the underlying collection, selects only red objects, then prints out the name of each object that was matched:

myShapesCollection.stream()
.filter(e -> e.getColor() == Color.RED)
.forEach(e -> System.out.println(e.getName()));

Likewise, you could easily request a parallel stream, which might make sense if the collection is large enough and your computer has enough cores:

myShapesCollection.parallelStream()
.filter(e -> e.getColor() == Color.RED)
.forEach(e -> System.out.println(e.getName()));

Using streams enables your code focus on "what" to do (instead of "how" to do it), leaving the library free to use whatever techniques it deems most appropriate (laziness, out-of-order execution, parallelism, etc.).

For more information on Lambda Expressions and Aggregate Operations, see the following resources:

See What's New in JDK 8 for information about other new features in JDK 8.

Tuesday Mar 18, 2014

JDK 8 Is Released!

Java SE 8 has gone live! Download it from the Java SE Downloads page.

For this release, the Java SE 8 landing page has been revamped and the Java Tutorials have been updated.

See the JDK 8 Release Notes for detailed information about this release. Highlights include the following:

Download JDK 8 today and try it out!

Friday Feb 14, 2014

Java ME Embedded 8 Early Access 2

The long awaited second early access release of Oracle Java ME Embedded 8 is available on OTN.

It comes with the following updates and enhancements to the Oracle Java ME Embedded software:

  • Enhanced device controls and improved input/output (IO) for small embedded devices, including a windowed Watchdog timer.
  • Ongoing support for CLDC 8 and Profile MEEP 8
  • Device Access APIs
  • Generic Connection Framework (GCF) API

See the following Reference Platform Release Notes for more information about the new features and platform-specific aspects:

Release Notes for Raspberry Pi

Release Notes for Qualcomm IoE

See the Oracle Java ME Software Development Kit Release Notes to learn how these features can be used to develop Java ME applications with Java ME SDK.

The Java ME documentation team published the Getting Started Guides for all the supported platforms. Ready to try the new features? Check the following documents:

Java ME Embedded and SDK documentation and related API specifications can be found at docs.oracle.com/javame.

Friday Feb 07, 2014

Restructured Deployment Information

The deployment guide for Rich Internet Applications (RIAs) has been reorganized and relevant information from the obsolete pre-6u10 deployment and plugin guides has been updated and included. The obsolete guides have been removed from the JDK 7 documentation set and replaced with pages that direct you to the Java Rich Internet Applications Guide.

Due to the reorganization, the URL for some pages has changed. If you get a Page Not Found error, please use the Table of Contents for the Java Rich Internet Applications Guide to locate the page.

The pre-6u10 Deployment Guide and Plug-in Guide are available in the JDK 6 documentation set.

Tuesday Oct 29, 2013

Audio for JavaOne 2013 Conference Sessions

The audio recordings are now available for some of the conference sessions held at JavaOne 2013 in San Francisco. The recordings are free and you can find them on oracle.com.

More sessions will become available, so check back for updates!

Thursday Sep 26, 2013

JavaOne 2013: Pointers to Information Related to Oracle Java Embedded Suite

Two JavaOne talks centered on the Oracle Java Embedded Suite:

For more information on Java Embedded Suite 7.0, see the Developer's Guide and Release Notes.

About

Blog about Java technology documentation and news about Java releases.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today