Java basics-Jdk6, Mustang, new feature preview-Linux general technology-Linux programming and kernel information, the following is a detailed description.
Java SE 6: A desktop winner
A developer with rich Java experience has tried Java SE 6 Beta and believes that Java SE 6 is expected to become a revolution in desktop development.
By Eric Bruno (Translated by Xu Ting)
The newly released Java Standard Edition 6 (Java SE 6, also known as Mustang) beta fully includes the predefined new features and is stable enough for mainstream applications. I downloaded and tried this new one the first time? Animals ?, It was shocked by its new desktop features. In addition to the consistent naming changes on the Java platform (remove 2), it also contains many new features worth exploring. These new features can be divided into two categories: desktop and core.
The improvements on the desktop are mainly focused on the user interface (UI) performance and integration with the OS desktop using localized interfaces. The core part is to improve developers' productivity and the manageability of Java programs. Sun's Mustang team also made significant improvements to Web services and security.
No matter what, no matter whether you are an application developer, a system manager, or provide independent tools, or a security expert, Java SE 6 has prepared something for you. This article mainly discusses in detail some interesting features I have tried.
Java core features and improvements.
We think that the core part of Java (Language and Tool) is very basic for all Java, including from interface API to server API library. Next I will discuss these Java core-related features based on different categories.
Developer productivity
The new Java compiler API allows you to compile another Java source code from a Java application. In this compilation process, the application accesses the relevant API library files based on the calculated dependencies. This process also generates Warning, error and other messages generated during compilation. Although this feature is not frequently used, I soon found a usage. For example, in my application A, I quickly used this feature to compile the data access layer code of. I can use my code to generate and compile the class of the database table I want to access in program A. The final result can be A JAR file generated from the Ant script. The most obvious fact is that I can re-compile these important files in my own program, at least I don't need to change the application.
Java Scripting is JSR223 implemented in Java SE6. This is a script framework that provides methods for the scripting language to access Java. You can find the script engine and call it to execute the script. This script API allows you to provide Java support for the script language. In addition, the Web Scripting Framework allows script code to generate Web Content in any Servlet container (such as Tomcat.
For debugging, the Java platform debugger (JPDA) has provided a deadlock test and can generate STACK information for objects that generate deadlocks. In addition, Java SE 6 allows different diagnostic tools to be added to a running JVM.
Application Management
In Java SE 6, memory leakage is enhanced in analysis and diagnosis. When a java. lang. OutOfMemory exception occurs, a complete stack information is obtained. When the heap is full, a Log file is generated to record this fatal error. In addition, the JVM also adds an option to allow you to run scripts when they are full. (This provides another method to diagnose errors)
The enhanced JMX monitoring API allows an application to send an event notification when the MBean property value passes in a specific parameter. (The attribute values here can be in complex types)
For users of Solaris 10, the Hotspot JVM provided by Solaris provides a way to track and display activities in the JVM through Solaris DTrace (which is a system debugging tool, including garbage collection, class loading, threads, locks, and so on. I got a first-hand DEMO on JavaOne. The details shown in this DEMO are amazing. For example, when an application is running, DTrace allows you to abort code anywhere and view all libraries loaded into the memory (not only Java class libraries, but also system-level libraries ), in addition, it can be traced to the Solaris kernel, or even directly to the hardware! The new Java tool provides a system-level tracing debugging tool all over the world. I still remember that I often receive Signal8 errors on the Solaris JVM. This feature will save a lot of speculation.
Web services
Java SE 6 contains some new APIs that support Web Services. The XML Digital Signature API allows you to encrypt Web Services data based on Java. Java-XML Web Services (JAX-WS) 2.0API updates an API library that was previously called a JAX-RPC. The enhanced Java-XML Binding (JAXB) 2.0 supports XMLSchema and binds a Class to a Schema. Finally, the Streaming API for XML (STaX) provides a two-way API, which can read or write XML through an event stream, including skipping a part, then directly focus on the capabilities of another small part of the document.
Security
Java SE 6's Security Section integrates GSS/Kerberos operation APIs, JAAS authentication on LDAP, and? Request security authentication? Which of the following protocols can be selected by an application? Request security authentication? The protocol used.
Desktop features and Improvements
Java has long been regarded as a first-class server-side software language, but desktop GUI applications can only be second-class. Sun's Java Desktop team is trying to change this situation. By calling the system GUI interface, you can better display Java GUI applications. Their efforts not only improved GUI performance in Java SE 6, but also changed the behavior of some Java GUI applications. (For example, DnD support is provided)
Most of the new desktop features in Java SE 6 come from the JDesktop Integration Components (JDIC) project. The JDIC project provides Java applications with methods to access the underlying local desktop GUI interface of the operating system, such as browsers, Email editors, file type binding, system pallets, and startup and printing of overcast applications. Below are some of the most significant desktop features in Java SE 6.
* Supports the startup interface. The startup interface (Splash Screens) is an interface that you can view when an application is started. The startup interface in Java SE 6 can be displayed even before JVM is started.
* Improvements in JFC and Swing:
By calling Windows APIs, Java SE 6 not only improves GUI performance, but also ensures compatibility in current and future Windows versions.
O enhanced layout management includes a customizable layout management, as well as some simpler methods for GUI element layout.
O Java SE 6 significantly enhances the drag-and-drop function of the Swing control and can be customized.
O real dual buffering, providing fast and smooth graphics.
* System Tray support. In the java. awt package, two classes SystemTray and TrayIcon are added, which allow you to add icons, prompt information, and pop-up menus in the system tray area of Windows or Linux using GNome. The System Tray area is the area shared by all applications, usually in the lower right corner of the screen. System actions and events allow your Java applications to perform mouse events in the tray area. I found that this feature is also very useful to my server programs. For example, I can use the desktop API to easily start a browser and open the management interface of this server program (of course, is an HTML page ). On Linux or windows, I no longer need to enter the URL and port number of the management interface. Just click the tray icon :)
* JTable supports printing.
* Java 2D has been enhanced a lot. It is mainly used for character display, especially on the LCD display screen. It integrates many font anti-sawtooth settings to ensure smooth display of text.
* The New java. awt. Desktop package. In Java SE 6, the new package aims to make Java GUI applications become? First-class citizen ?. With this package, Java applications can start the default browser and mail client, and integrate some general desktop applications to start. For example, start OpenOffice, open, edit, and print some specific types. The Desktop package is implemented through action events. You can integrate these actions into your applications.
* Internationalization. Java SE 6 provides some extensibility features, such as date format, Unicode text consistency, and resource clusters.
A Java Desktop revolution
Java SE 6 provides many features, improvements, bug fixes, and so on (for more information, see my other translation ), this article aims to record the history of the upcoming important Java version. This change involves so many aspects of Java SE, and almost all Java applications will be affected, including those Java EE applications.
Java SE 6 has the potential to achieve a desktop revolution, just as Java 2 has achieved a server revolution. It is better to prepare yourself for the coming storm and make yourself a pioneer in the revolution.
Eric Bruno is a New York-based consultant who has built high-volume Web applications, database systems, and real-time transactional systems in Java and C ++. visit www.ericbruno.com for more about him.
Posted in Java Tech | No Comments»
New features in Java SE 6.0
Monday, March 6th, 2006
A few days ago, Sun just released Java SE 6.0 Beta. And I had viewed the release notes and some articles discussed the new features.
Here is a translation about the new features and enhancement list provided by Sun officially. And I had translated this to Chinese (Simplified Chinese .)
The original document is placed HERE.
Here is the translation.
# Thanks to Zou, he helped me review this translation.
# There are some features about the compiler and VM are remained as original, because I am short at this areas. if you have any suggestions, please leave your comments of send a mail to my mailbox: tonny.xugmail.com
TOTO.net braket
Just another WordPress weblog
Blog Technical Articles Photos Resume
Java SE 6.0 (code? Mustang ") is the next version of Java to be available soon. Compared with J2SE 5.0, many important features and enhancements are added. These new features and enhancements are listed below.
All entries are classified according to the scope and components involved. The first column indicates the scope of the modification.
* JSR-indicates that this is a major feature that implements a certain JSR (Java standard requirement ).
* API-indicates the newly added API
* IMP-indicates that no new APIs are added, but some performance enhancement improvements are made.
Please note: this is a Beta milestone ,? Mustang? Development continues. These are the contents in JSR270. JSR270 does not define new features, but it lists a series of other JSR or the requirements being reviewed .? Mustang? The goal of the final release version of JSR270 is to include all the features of JSR270, but it is not guaranteed (some features that have been approved may not end up in? Mustang? Version ).
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.