Tiger « Language « Java Articles

Home
Java Articles
1.Build Deploy
2.Class
3.Core Library
4.Data Types
5.Database JDBC
6.Design
7.Development
8.File Input Output
9.Graphics Desktop
10.J2EE Enterprise
11.J2ME Wireless
12.JVM
13.Language
14.Library Product
15.Network
16.Security
17.SOA Web Services
18.Test
19.Web Development
20.XML
Java Articles » Language » Tiger 

1. Taming Tiger, Part 3    javaworld.com

Welcome to the third and final part of this three-part series on Sun Microsystems' latest release of the Java 2 Platform, Standard Edition (J2SE). As I mentioned in Part 1, J2SE 5 (also called Tiger) is the most significant revision to the Java language since its original inception and has extended Java with several new features. To refresh your memory, Part 1 provided a brief introduction to J2SE 5 and covered many new additions to the Java language. Part 2 was devoted entirely to generics, which are Java's counterpart to templates in C++ and a similar facility (also called generics) in C# 2.0. In this final installment, I focus exclusively on the newly introduced metadata feature in J2SE 5 called annotations. Annotations allow programmers to decorate Java code with their own attributes. These attributes can be used for code documentation, code generation, and, even during runtime, for providing special services such as enhanced business-level security or special business logic.

2. Taming Tiger, Part 1    javaworld.com

Welcome to the first of a three-part series on Sun Microsystems' latest release of the Java 2 Platform, Standard Edition (J2SE). J2SE 1.5—code-named Tiger—is the most significant revision to the Java language since its origination. With version 1.5, Java has been extended with several new features, and my goal with this series is to introduce you to the most important features.

3. Taming Tiger, Part 2    javaworld.com

Welcome to the second part of this three-part series on Sun Microsystems' latest release of the Java 2 Platform, Standard Edition (J2SE). To refresh your memory, Part 1 was a quick introduction to J2SE 1.5 and covered many new additions to the Java language: auto-boxing and -unboxing of primitives, enumerations, static imports, the enhanced "for" loop, variable method arguments, and the newly formatted input method. I devote Part 2 entirely to generics, Java's counterpart to templates in C++ and a similar facility (also called generics) in C# 2.0.

4. Creating Varargs in Java 1.5 Tiger    onjava.com

Editor's note: O'Reilly's new Developer's Notebook series focuses on learning by doing -- you get the goods straight from the masters, in an informal and code-intensive style suited to software developers. Java 1.5 Tiger: A Developer's Notebook, by bestselling Java authors Brett McLaughlin and David Flanagan, follows the same task-oriented format, jumping you right into Tiger. The book covers the important new features of Java 1.5, including generics, boxing and unboxing, varargs, and much more.

5. Peeking Inside the Box: Attribute-Oriented Programming with Java 1.5, Part 1    onjava.com

In this article, I will consider the case of a status-bar component embedded in a GUI application. I will explore a number of different ways to implement this status reporter, starting with the traditional hard-coded idiom. Along the way, I will introduce and discuss a number of new features in Java 1.5, including annotations and run-time bytecode instrumentation.

6. Readable Java 1.5    onjava.com

The Java 1.5 proposal offers programmers a false choice between desirable new features and readability. In fact, all of the proposed new features for 1.5 can be represented by clear, unambiguous, and readable constructs without breaking backwards compatibility. In the rest of this article I will illustrate this point by describing three alternative syntaxes I am proposing.

7. Peeking Inside the Box: Attribute-Oriented Programming with Java 1.5, Part 2    onjava.com

In the previous article in this series, "Peeking Inside the Box, Part 1," I introduced the concepts of Attribute-Oriented Programming, Java 1.5 annotations, and bytecode instrumentation. I used these concepts to provide a JStatusBar GUI component that reports on the progress of an application without any explicit code. In this article I will introduce a completely different implementation of the same JStatusBar that uses thread sampling rather than bytecode instrumentation. I will then combine the two practices to develop a solution that has the best features of each.

8. Reflection on Tiger    today.java.net

Much has been written about the new language features in J2SE 1.5, Tiger. Many, such as the introduction of enums, generics, and metadata, involve changing bytecode. These additions to the language require modifications to existing APIs. One of the APIs most radically affected by these changes is the Reflection API. Reflection has existed since JDK 1.1, and many frameworks, libraries, and utilities have been built upon it. This article examines the modifications to the Reflection API that are now available to the public as part of JDK 1.5 beta 1, and shows how you can take advantage of them in your code.

9. Varargs Excerpt from Java 1.5 Tiger: A Developer's Notebook    today.java.net

This book excerpt is from Chapter 5 of Java 1.5 Tiger: A Developer's Notebook, by Brett McLaughlin and David Flanagan, ISBN 0596007388, copyright 2004. All rights reserved. This chapter, titled "varargs," is posted with permission from O'Reilly Media.

10. Tiger and Beyond, the Future of the Java Platform    java.sun.com

With the launch of Java 2 Platform, Standard Edition 5.0, code- named "Tiger," we explored the innovations in J2SE 5.0 with Graham Hamilton, Sun Fellow in the Java Platform Team at Sun Microsystems. In Part Two of the interview, we asked him to provide a broader perspective on Tiger, Java 2 Platform, Standard Edition 6.0, Java 2 Platform, Standard Edition 7.0, and the long-term future of the Java platform.

11. Tiger Roars: an Interview with Sun Microsystems Vice President Graham Hamilton, Part One    java.sun.com

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.

12. J2SE 5.0 (Tiger)    java.sun.com

The Tiger feature list is defined in JSR-176 (J2SE 5.0 (Tiger) Release Content), which serves as an umbrella JSR that only lists APIs defined in other component JSRs. Please see JSR-176 for details about the component JSRs.

13. Cross-Referencing HTML the Tiger Way    java.sun.com

The enormously widespread adoption that HTML enjoys as the markup language of the internet is a testimony to its unparalleled usefulness in getting content published easily. HTML offers a variety of tags to structure content, among them tags to mark headers at different levels like

through

, or tags to define lists like
    or
      . HTML documents are simple text documents which can be created using any editor or by exporting a document from any current office productivity suite. What HTML lacks, however, is real support for cross-referencing for items like chapters, figures, or tables. Maintaining an ordered numbering scheme for such items, plus making sure that references to these items from elsewhere in the document are kept up-to-date should items be moved to a different location, added, or removed entirely, is beyond the scope of HTML. Yet such capabilities come in very handy, especially when managing such references across multiple documents. This article describes a simple Java tool called Xref which provides such capabilities, and some others beyond that as well. This tool demonstrates the benefits of the new ease-of-development features that have been added to the upcoming J2SE 5.0 release ("Tiger"). The main features used here are generics, typesafe enums, and other language extensions like the enhanced for loop for collections.

14. Migrating to Tiger: James Gosling and Mark Reinhold on Java 2 Platform, Standard Edition 5.0    java.sun.com

As part of Sun Microsystems' effort to encourage the adoption of Java 2 Platform, Standard Edition (J2SE) 5.0, Tiger, we met with the father of Java technology, James Gosling, vice president and Sun Fellow, to get his take on how Tiger is doing.

15. J2SE 5.0 in a Nutshell    java.sun.com

Java 2 Platform Standard Edition (J2SE) 5.0 ("Tiger") is the next major revision to the Java platform and language; it is currently slated to contain 15 component JSRs with nearly 100 other significant updates developed through the Java Community Process (JCP).

16. Five Reasons to Move to the J2SE 5 Platform    java.sun.com

This article provides five important reasons to move to the Java 2 Platform, Standard Edition (J2SE platform) 5.0. Each reason is supported by data and references to prove that the 5.0 release will reduce development and runtime costs.

17. Taming Tiger: Concurrent collections    ibm.com

In the early days of Java programming, a professor from the State University of New York (SUNY) College at Oswego decided to create a simple library to help developers build applications that were better able to handle multithreaded situations. This isn't to say you couldn't get by with the existing libraries, but just like having a standard networking library, it was easier to do multithreading yourself with a debugged, trusted library. With the help of a related book from Addison-Wesley, over time this library became popular. Eventually, the author, Doug Lea, decided to pursue making it a standard part of the Java platform as JSR-166. What that library has morphed into is the java.util.concurrent package of the Tiger release. In this Taming Tiger tip, you'll explore the new Queue interface in the Collections Framework, the non-concurrent and concurrent implementations of that interface, a concurrent Map implementation, and special-purpose concurrent List and Set implementations for when read operations heavily exceed write operations.

18. Taming Tiger: The Collections Framework    ibm.com

The lion's share of interest in JDK 5.0 has been on the more prominent features of the Collections Framework, like the new language-level changes to support generics and the concurrent collections utility libraries found in the java.util.concurrent package. In fact, prior developerWorks content covered just that in "Concurrent collections" and the "Introduction to generic types in JDK 5.0" tutorial. But other enhancements haven't been given nearly enough attention. In this article, I'll look at three other changes: the updated Arrays and Collections classes and the new Queue interface, with its PriorityQueue implementation.

19. Taming Tiger: JDK 5.0 source code licensing    ibm.com

Sun's decision to release the source code for JDK 5.0, providing access to the non-public classes in addition to the public ones, gives developers a chance to look even further under the covers of the latest release -- if you don't mind abiding by licensing terms. Without getting into the "should Sun open source the Java platform" discussion, I'll show you how to get the source and discuss the two license options: Sun Community Source License (SCSL) and Java Research License (JRL) . I'll also briefly discuss the early access snapshot release of the 6.0 Mustang binaries and source.

20. Taming Tiger: Get environment variables and invoke subprocesses    ibm.com

While I personally don't want to go back to the original event model for working with AWT components, one nice feature of the early access version of the Java platform (also known as the alpha releases) was the ability to access environment variables. This approach went against the "Write Once, Run Anywhere" mantra of the time, and the getenv() method of System was deprecated with the 1.0 release of the Java platform. Why something came out deprecated in a 1.0 release always confused me, but seeing the method there always seemed to spark interest in using it with new developers. Fast forward to 2004 and now you finally can. As Listing 1 shows, usage of the method is easy:

21. Taming Tiger: Beyond the basics of enumerated types    ibm.com

As Brett McLaughlin described in his article "Getting started with enumerated types" (which I recommend you read as a precursor to this article), you create an enumerated type by creating a named set of objects using the new enum keyword. You can then treat each named value as an instance of that class, providing you with compile-time type safety that a named set of integers can't. Listing 1 creates an enumerated type and uses the type-safe usage as an argument to a helper method. The values() method of the enumerated type returns an ordered array of the different values of that type.

22. Taming Tiger: Loading Properties from XML    ibm.com

None of this should be new to you. This is how the Properties class has always worked. What is new, however, is the option of loading a set of properties from an XML file. The DTD for that is shown in Listing 4.

23. Annotations in Tiger, Part 1: Add metadata to Java code    ibm.com

Tiger incorporates a far more versatile metadata facility into the core Java language through a new feature called annotations. Annotations are modifiers you can add to your code and apply to package declarations, type declarations, constructors, methods, fields, parameters, and variables. Tiger includes built-in annotations and also supports custom annotations you can write yourself. This article will give you an overview of metadata's benefits and introduce you to Tiger's built-in annotations. Part 2 in this article series will explore custom annotations. My thanks to O'Reilly Media, Inc., which has graciously allowed me to use the code sample from the annotations chapter of my book on Tiger for this article (see Resources).

24. Taming Tiger: Default exception handling in threads    ibm.com

As with many things for the Java platform, if you don't like the default behavior, you can change it. Prior to the Tiger release of the Java platform, you couldn't replace the default behavior for all threads, but you could create a new ThreadGroup and change the default behavior for any threads created within that group. Overriding the uncaughtException(Thread t, Throwable e) method, allows you to customize that behavior. Then, any threads created in that thread group will get the new behavior when an unforeseen runtime exception happens. While it is best to fix the underlying problem, I'll provide a simple demonstration that shows the steps necessary to change the default behavior. Listing 3 shows the adjusted test program to place the executing code within a new thread group:

25. Taming Tiger: Pre-release of Tiger is now available    ibm.com

This brings you to the Browser Registration screen (Figure 5). Here, you pick which, if any, browser you want this version of the Java plug-in to run in. Given that this is pre-release code, you might want to deselect all, just to have the runtime available outside the browser. Depending on how much testing you want to do in the browser, or if you have a dedicated testing machine, let's assume we won't select any here (that is, deselect all the browsers) and then press Install.

26. Taming Tiger: AWT grows up    ibm.com

When it comes to discussing Java user interfaces, the Swing component set gets all the press. But there's more to GUIs than Swing. Just like with earlier releases of the Java platform, Swing is built on top of the Abstract Window Toolkit (AWT).

27. Taming Tiger: Formatted output    ibm.com

The original plan for the 1.4 release J2SE included support for formatted output. Probably due to time constraints and the fact that the feature wasn't a release driver, the capabilities were left out of the release. Now with Tiger, there is built in support for printing with format strings.

28. Taming Tiger: Virtual machine updates    ibm.com

By default, the JVM starts up with the client HotSpot virtual machine, unless a 64-bit chip is used, which defaults to the server VM. You can use the -server command-line option to force the enabling of the server HotSpot VM. If you are on a 32-bit Solaris SPARC or Linux/Solaris i586 system and don't specify the -client or -server options, the VM will automatically detect which version to use. Microsoft Windows defaults to client-side.

29. Taming Tiger: Are you SCJP 5 certified?    ibm.com

One of 5.0's bigger additions is with generics. You'll need to understand the differences between the various collection types, when to use each, and the importance of overriding both hashCode and equals. You'll need to know how to write generic methods and classes -- not just use them. You should expect to be tested on dealing with sorting through both the Comparable and Comparator interfaces. If you haven't used generics much, you should spend some time focusing on this area.

30. Taming Tiger: Context popup menus    ibm.com

The JPopupMenu component is the container class for context-sensitive menus -- those menus that appear when you typically right click over something on a Microsoft Windows box. In a browser, for instance, bringing up the popup menu will typically allow you to bookmark a page or view its source.

31. Taming Tiger: Get pane relief with Tiger    ibm.com

Welcome to the world of no content panes. Before exploring how not to use a content pane, let's first look at what it is and why one exists. In Swing, all the top-level containers, like JFrame, JApplet, and JDialog, are internally managed by a JRootPane. But why doesn't the frame manage itself? Well, the root pane gives the top-level objects the ability to have a menu bar, a glass pane for dragging objects above other components, and a content pane for containing the components for the whole container. It is this content pane that you use to set the layout manager and add components to, as shown in Figure 1. Because all the top-level containers need the same set of objects, their management is delegated to JRootPane.

32. Annotations in Tiger, Part 2: Custom annotations    ibm.com

The basic usage I've just shown you is far from robust. As you'll remember from Part 1, annotation types can have member variables (see Resources). This is useful, especially when you begin to use annotations as more-sophisticated metadata, not just raw documentation. Code-analysis tools like to have lots of information to crunch, and custom annotations can supply that information.

33. Taming Tiger: Ocean and Synth meet Metal    ibm.com

It's official: As of September 30, 2004, version 5.0 of the Java 2 Development Kit (yep, it's back to the good old JDK) is ready for prime time. As part of the new platform, you get two new look-and-feel objects that let you change what your program uses and how it looks. Ocean is the new default Java look and feel, replacing the old Metal version. Synth is new and provides for the description of the look and feel through an external XML file.

34. The Release of the Tiger and Introduction of Mustang    developer.com

The final release of tiger was announced by Graham Hamilton, Calvin Austin, Doug Lee, James Gosling, and Jeff Jackson. This is the largest java release the company has made since 1995.

35. In Anticipation of Tiger    developer.com

The Java language and syntax are being enhanced to make code more readable, expressive, comact, safer, and easier to develop, without sacrificing compatibility. These new language features are being incorporated after several years of discussion and comparison of Java to other programming languages. These features are the most anticipated amongst the Tiger release contents and have spawned numerous threads of discussion within the developer community. The changes will come in the form of class file format changes, generic (a.k.a. parameterized types like C++ templates) support, a 'foreach' type of looping construct, automatic conversion between primitive, and corresponding object data types, type-safe enums, an improved syntax for using static constants, and the use of metadata tags which allow the developer to insert simple declarative tags in the source code for which the compiler generates the necessary boilerplate code.

36. J2SE 1.5 - Effective Java Programming with Tiger    developer.com

The features that were discussed in this article are only a subset of features that are planned to ship with Tiger. These features are developer savvy and yet powerful additions to the Java Programming language. Most of the listings in this article are tested with the Generics early access compiler version 2.2. Although enough features are targeted towards the Tiger release, the final specification will become soon available for review once the component JSRs releases them.

37. JCP Watch: Getting closer to Tiger    developer.com

This past month, the Tiger (Java 5.0 platform) JSR and several dependent JSRs made it past the final approval ballot. Several early access specifications were made public under the new JCP 2.6 guidelines. Further, the Java Wireless Messaging API was published in its final form.

38. Are Java Developers Ready for Hunting Tiger?    developer.com

The most-awaited Java 2 Standard Edition 1.5 (J2SE1.5) is scheduled to ship its beta in late 2003. This release is code named Tiger. This is a feature release that has a lot more additions to the Java language itself. Tiger is been incubated under the JCP umbrella. JSR 176 outlines the release contents for J2SE 1.5. In this article, we will discuss the core language features that are powerful and desperately wanted by developers for a long time.

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.