分享
 
 
 

Tiger Roars:庆祝JDK 5.0正式版的发布

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

Tiger Roars:

The Release of Java 2 Platform, Standard Edition (J2SE) 5.0, an Interview with Sun Fellow Graham Hamilton

Java 2 Platform, Standard Edition 5.0 (J2SE 5.0), the most extensive update of the Java platform since its inception in 1995, has arrived. The new release (code-named "Tiger") is designed for exceptional quality, improved ease of development, greater speed, enhanced performance, and extended monitoring and management capabilities.

To get up to speed on J2SE 5.0, we met with Graham Hamilton, Sun Fellow in the Java platform team at Sun Microsystems. Hamilton was the lead architect for J2SE releases 1.3, 1.4, and now, 5.0. His current projects include planning for post-Tiger JDK releases, an Ease-of-Development initiative across J2SE and Java 2 Platform, Enterprise Edition (J2EE), and work with Sun's tools group on new tools initiatives.

Gaining Familiarity with J2SE 5.0 Developers can download the JDK here: http://java.sun.com/j2se/1.5.0/download.jsp

What is the basic take-home message about J2SE 5.0? What do you most want developers to understand about it?

Tiger is a major and broad update across the entire core Java platform. It includes the first big set of language changes since the original Java language was released in 1995. But there are also significant updates to all main areas of the J2SE platform, from low-level virtual machine details to high-level GUI improvements.

I'm also happy to report that Tiger looks like our highest quality J2SE release ever. Quality had been job #1 throughout the release development and this has paid off. In his recent blog, Mark Reinhold, Chief Engineer for J2SE, talks about how well we are doing on our various quality metrics.

An Easier Time for Developers

How does Tiger make life easier for developers?

In many ways. For example we've added generic types, which allow the language and the compiler to do more type checking for you. Developers who worked with the Java collection libraries previously had to hold a lot of type information in their heads, and the language couldn't keep track of it for them. Now, generics lets you specify that type information as part of your source file. The compiler can do more checking for you and get rid of a bunch of casts you had to do previously. Generics makes developers more productive and programs more reliable.

We've added a number of other smaller language changes to help developer productivity. This includes simplified iteration over collections and arrays -- the so-called "enhanced for loop" syntax. We've added what we called boxing and unboxing to automatically map between primitive types and object types. Those are both fairly small language changes, but they simplify common tasks for developers.

As part of the ease-of-development work, we've also added support for "C" style printf. Many of us who came from a "C" background appreciate the power and simplicity of printf for simple formatting. Now you can use printf with the Java language.

Another big change is Java language annotations (JSR 175). This supports a style of declarative programming within the Java language, which started as a classic object-oriented language, full of imperative operations such as "x.doThis()" and "y.doThat()". However, as the libraries evolved, a declarative style of programming slowly crept into the platform. For example, with JavaBeans you can use particular method naming patterns, getFoo and setFoo, to define a JavaBeans "foo" property. Similarly, as part of serialization we specified that the inheritance of a particular marker interface could be used to indicate that a class was serializable. Enterprise JavaBeans also invented a variety of marker conventions to specify how EJBs work.

"I'm happy to report that Tiger looks like our highest quality J2SE release ever. Quality had been job #1 throughout the release development and this has paid off."

- Graham Hamilton,

Sun Fellow in the Java Platform Team, Sun Microsystems

Now, in stepping back, we realized two things. First, a variety of these kinds of marker techniques had crept into the Java platform. Second, they were being highly effective. They were allowing developers to declaratively mark methods or classes as having a particular characteristic and then tools or libraries would perform special processing on those classes or methods. This reduced and simplified the amount of explicit programming that was necessary.

But the marker conventions we were using were rather ad hoc and were proving difficult to generalize into richer uses. So with Tiger, we've added the idea of declarative programming as a first-level concept in the Java language itself. There is now a mechanism where you can define annotation types, and then use those types to annotate classes, fields, and methods. And then tools and libraries can process those annotations and do work on the developer's behalf. This isn't just a theoretical concept. This is something we're pursuing as one of the main programming styles in J2EE 5.0, particularly in projects like EJB 3.0. This use of annotations looks like it will help considerably simplify J2EE programming.

Take us through the six major themes of Tiger.

Theme #1 is quality. By quality, we mean stability, robustness, and compatibility. We want your earlier applications to just plain work with Tiger. We want to maintain previous behavior. We want this to be a release that can stay up for months or years at a time.

As part of developing the releases we have treated quality as indisputably job #1. For example, we have been working to improve many of our internal engineering processes so as to more carefully manage change, to improve testing efficiency, and thus to improve overall release quality. I think this focus has been very effective.

A second major theme is performance and scalability. As part of our work on garbage collection we've tested with heaps of over 500 gigabytes of physical memory. Similarly, we've made sure that the JVM can run on extremely large multi-processor systems. (The Sun hardware guys are very kind and sometimes let us borrow some of their very biggest and shiniest toys.) Now I wouldn't necessarily recommend a 500 Gig heap or a hundred-way processor for home use quite yet. It's nice that we can scale to the very high end, but we are mostly tuning and testing on much more mundane systems.

Now, in looking at how customers actually deploy to large systems we realized we had been suffering from a flawed assumption. Historically, we've provided very detailed configuration flags to let you manually configure the JVM to best exploit server class systems. If you knew how to set the right flags, you could really boost your performance on large systems. However we've now realized that we got a little too carried away with all these configuration options and in practice many customers ignored most of these options.

So one of the things that we're introducing in Tiger is what we call performance ergonomics, where at JVM start-up the JVM will analyze the kind of environment it's in, and will now automatically configure these fancy options that you used to have to set manually. For example, if you are on a large server system with lots of memory, it will use aggressive heap options targeted for high throughput. If you want to, you can still manually configure all these options, but my advice would be to initially just try it with the defaults. This may now work even better than doing hand configuration.

"With Tiger, we've added the idea of declarative programming as a first-level concept in the Java language itself."

- Graham Hamilton,

Sun Fellow in the Java Platform Team, Sun Microsystems

The third big theme is monitoring and manageability. The goal is to make it easier for developers to see what's going on inside the JVM and inside Java applications. We've added new APIs to expose performance and management information. We're also delivering some simple monitoring and management tools as part of the J2SE 5.0 release. For example, we're including a simple JConsole tool, that lets you look at a variety of management information, including things like heap usage and the number of threads that are running.

The fourth theme is the desktop client. We've worked to improve both the performance of the Java desktop client, but also the GUI look-and-feels. We've continued to improve the quality of the Windows XP look-and-feel and the GNOME GTK look-and-feel. We've also added a new cross-platform look-and-feel called "Ocean" that provides a clean, modern, cross-platform look-and-feel.

We're also looking into the future with our GUI work and we've already starting experimenting with Tiger on some of the early Microsoft Longhorn builds. We know that the Longhorn release will be very important to desktop developers, so we're making sure that J2SE will run well and look great on Longhorn.

The fifth theme is ease of development, which we've already talked about. That includes various API updates including the printf facility I mentioned earlier. It also includes the new language features we talked about.

The sixth theme is core XML support. We've upgraded the core XML support provided in J2SE by adding new versions of the SAX parser, the DOM Document Object Model, and the XSLT transform engine.

XML and Web Services support on the Java platform continue to evolve quickly. You can get the very latest XML and web services support as part of the Java Web Services Developer Pack (JWSDP) from java.sun.com. Over time, as those ideas stabilize, we'll import them into future releases of J2SE.

The Most Important Feature of Tiger

If you were pressed to name one thing as the most important about J2SE 5.0, what would it be?

Well different people will probably make different choices. For example, I know many people really like generics. But personally, I think the single most important feature in Tiger is JSR 175 annotations, and that's largely because of the impact it's having on J2EE 5.0 going forward. For example, take a look at the recent public draft from BEA for Web Services metadata (JSR 181) or the recent early draft for EJB 3.0 (JSR 220) to see how they are using annotations.

Want to learn more about J2SE 5.0? Got a question about J2SE 5.0? Join the October 12 online chat on New Language Features in J2SE 5.0 with guests Scott Seligman, Joe Darcy, and Peter von der Ahé.

Feedback from Developers

What kind of feedback are you getting from developers so far?

We're getting very positive feedback about the release, especially on the new language features. I think most of the Java community is cautious about language change. People respect the great job James Gosling did with the original language design. But there is a lot of enthusiasm for generics, and boxing, and the extended for loop syntax, etc. Developers are telling us that these work well. We've had these and other features in beta for nearly nine months and people are very enthusiastic about what they're seeing.

We're also getting good feedback on release quality. We think Tiger is going to be our highest quality J2SE release ever. We're not going to be able to fix every bug, I'm afraid, but we are trying to make sure that the overall quality is high, and that this is a stable release that you can deploy on from day one.

It sounds like Tiger has been an enormous project. How has all this work been handled?

"I think the single most important feature in Tiger is JSR 175 annotations, and that's largely because of the impact it's having on J2EE 5.0 going forward."

- Graham Hamilton,

Sun Fellow in the Java Platform Team, Sun Microsystems

We've benefited from very broad Java community engagement in creating Tiger through the Java Community Process (JCP). There were 15 component Java Specification Requests (JSRs), each with a strong cross-industry expert group working together to create the new specifications. Thank you everyone! Companies such as IBM, BEA, Oracle, and many others helped to drive and refine those specifications. In addition, we are also very grateful for the detailed and pragmatic contributions from academia -- Professor Doug Lea and Professor Bill Pugh each led a key component JSR and drove it to success. Thank you!

Sun has been the overall specification lead for Tiger and has coordinated the various pieces. From within Sun, we've had several hundred people who've worked on various aspects of Tiger, either in API design, or implementation, or even more importantly in platform testing and stabilization. The latter part is the least visible but in many ways the most important part of a big release like Tiger.

So Tiger has been a very big effort, but we think the final release is well worth it!

See Also

Download the J2SE 5.0 JDK

Graham Hamilton Weblog

Graham Hamilton at 2004 JavaOne Conference

The All-New Java 2 Platform, Standard Edition (J2SE) 1.5 Platform: Programming with the New Language Features in J2SE 1.5

J2SE 5.0 in a Nutshell

New Language Features for Ease of Development in the Java 2 Platform, Standard Edition 1.5: A Conversation with Joshua Bloch

Mark Reinhold Weblog

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有