In the seventh line from the bottom, change "bugs fixes" to "bug fixes".
[6] Page 18
Change "You can download them from http://www.phptr.com/corejava." to "You can download them from http://horstmann.com/corejava."
[4] Page 25
In the NOTE, change "Environnment" to "Environment".
[6] Page 36
Change 鈥渋t simply displays the string We will not use 'Hello, World'!鈥?to 鈥渋t simply displays the string We will not use 'Hello, World!'鈥?(i.e. move the ! inside the quotes to match the program at the top of the page)
[5] Page 40
After "..you use a p, not an e, to denote the exponent." add: "The exponent is specified in decimal and denotes a power of two."
[4] Page 41
Change "an unused 2048 byte-range" to "a range of 2048 unused values"
[6] Page 56
Change "Point your web browser to the docs/api/index.html subdirectory of your JDK installation." to "Point your web browser to the index.html file in the docs/api subdirectory of your JDK installation."
Remove the line "^ Converts to upper case 0XCAFE". (This option was present in the Java 5 release candidate, but it was later dropped.)
[6] Page 63
Change "You use two a two-letter format..." to "You use a two-letter format..."
[4] Page 64
Last line of Table 3-7 (continued): Change E to Q.
[2] Page 80 BigIntegerTest.java line 8
Change Scanner.create to new Scanner
[4] Page 85
Change System.out.print(" " + a[i]); to System.out.print(" " + args[i]);
[4] Page 86
Change "Initially that is just r itself, but ..." to "Initially that is just r + 1, but..."
[4] Page 89 CompoundInterest.java line 5
Change final int STARTRATE to final double STARTRATE
[6] Page 95
Change "Encapsulation (sometimes called data hiding) is a key concept in working with objects. Formally, encapsulation is nothing more than combining data and behavior in one package and hiding the implementation of the data from the user of the object." to "Encapsulation (sometimes called information hiding) is a key concept in working with objects. Formally, encapsulation is nothing more than combining data and behavior in one package and hiding the implementation details from the user of the object."
[4] Page 95
Change "When you invoke a message on an object" to "When you invoke a method on an object"
[6] Page 96
Change "Thus, a class depends on another class if its methods manipulate objects of that class." to "Thus, a class depends on another class if its methods use or manipulate objects of that class."
[4] Page 104-106 CalendarTest.java
The program prints an unsatisfactory calendar in locales whose first day of the week is not Sunday. (In most parts of the world, the first day of the week is considered Monday--after all, Saturday and Sunday are the weekend.) The following changes take care of this:
Remove the header SunMon Tue Wed Thu Fri Sat on page 104
In the program listing, replace lines 18 and 19 with
// get first day of week (Sunday in the U.S.) int firstDayOfWeek = d.getFirstDayOfWeek();
In lines 22 and 49, replace Calendar.SUNDAY with firstDayOfWeek
Add the following four lines before the } in line 44. (The first line is blank)
// start a new line at the start of the week if (weekday == firstDayOfWeek) System.out.println();
Remove lines 36 through 39
[4] Page 105
Change "For each day, we print a space if the day is < 10, then the day, and then a * if the day equals the current day." to "The current day is marked with a *."
[6] Page 106
In the Note, remove "and the hard-wired assumption that the week starts on a Sunday"
[6] Page 121
Change "demonstate" to "demonstrate"
[6] Page 128, 129
Change "Booleans" to "boolean values" (note monospace)
[6] Page 135
Remove the sentence "The sole purpose of package nesting is to manage unique names."
[6] Page 141
Change "Recall that you can import public classes only from other packages." to "Recall that you can import only public classes from other packages."
[4] Page 141
In the third line from the bottom, change "packages" to "package".
[4] Page 143
In the last line, change "set the warning border" to "set the warning string".
[6] Page 147
Change "If you like, you can place hyperlinks to other classes or methods anywhere in any of your comments." to "If you like, you can place hyperlinks to other classes or methods anywhere in any of your javadoc comments."
[6] Page 156
Remove "(that is, when i is 1 or 2)" and "(when i is 0)" , so that the remaining clause is "either Employee or Manager".
[6] Page 165
Change "In particular, move common fields and methods (whether abstract or not) to the abstract superclass." to "Move common fields and methods (whether abstract or not) to the superclass (whether abstract or not)."
[6] Page 172
In the numbered list, add 3. before "Compare the classes of this and otherObject." Increment the following numbers.
[4] Page 172
Remove "Judging from this evidence. . ." until the end of the note.
[4] Page 173
In Table 5-1, change the Hash Code column from 140207504 / 140013338 / 884756206 to 69609650 / 69496448 / -2141031506
[4] Page 174
In Table 5-2, change 3030 to 2556 (2x)
[6] Page 179
Change the last word on the page from "classed" to "called"
[6] Page 180/181
Change "relocation/tions/ting" to "reallocation/tions/ting" (3x)
[6] Page 181
Change "(This is different from, and, of course, never larger than, the array list鈥檚 capacity.)" to "(This is of course never larger than the array list鈥檚 capacity.)"
[6] Page 188
Change "returns a new Integer object initialized to the integer鈥檚 value, assuming the specified String represents" to "returns a new Integer object initialized to the integer whose digits are contained in the string s. The string must represent" (2x)
[4] Page 189
Change
System.out.printf("%d %d", new Object[] { new Integer(d), "widgets" } );
to
System.out.printf("%d %s", new Object[] { new Integer(n), "widgets" } );
[6] Page 191
Remove "We discuss reflection in the next section."
[6] Page 198
Change the last line from
while (cl != Object.class);
to
while (cl != null);
[6] Page 199
Remove line 3 (import java.text.*;)
[6] Page 201
Change "arrayCopy" to "arraycopy"
[6] Page 203/204
Change "fundamental" to "primitive" (2x)
[4] Page 206
Change
System.out.printf("%10.4f | %10.4f%n" + y, x, y);
to
System.out.printf("%10.4f | %10.4f%n", x, y);
[4] Page 207
Remove code lines 42 and 43.
[4] Page 215
Change the first java.lang.Comparable API header to java.lang.Comparable<T>. Remove the second java.lang.Comparable<T> header.
[4] Page 220 and 221
In the clone methods, change
return super.clone();
to
return (Employee) super.clone();
Page 221
Change
public Object clone() throws CloneNotSupportedException
to
public Employee clone() throws CloneNotSupportedException
[6] Page 228
Change 鈥淏ecause the TalkingClock defines no constructors鈥?to 鈥淏ecause the TimePrinter class defines no constructors鈥?
[4] Page 231
In the NOTE, change
java ReflectionTest 'TalkingClock$TimePrinter'
to
java ReflectionTest TalkingClock\$TimePrinter
(that is, remove the quotes and add a backslash). Both methods work, but the change matches the preceding text.
[6] Page 233
Change 鈥淣ote that the TimePrinter class no longer needs to store a beep instance variable. It simply refers to the parameter variable of the method that contains the class definition.鈥?to 鈥淣ote that the TalkingClock class no longer needs to store a beep instance field. The actionPerformed method of the TimePrinter class simply refers to the beep parameter variable of the start method.鈥?
[4] Page 233 (2x) and 235 (1x)
Change
Timer t = new Timer(1000, listener)
to
Timer t = new Timer(interval, listener)
[4] Page 254
Change /**import java.awt.* to import java.awt.*
[6] Page 251
Change frame.show(); to frame.setVisible(true);
[4] Page 330
In the API note for getActionMap, change "keystrokes to action keys" to "arbitrary objects to Action objects". In the API note for getInputMap, change "action keys to action objects" to "keystrokes to arbitrary objects"
[4] Page 330
Change released ctrl Y to ctrl released Y
[4] Page 343
Change "Each user interface has a wrapper class..." to "Each user interface component has a wrapper class...".
[4] Page 349
Change "Finally, you add the individual buttons" to "Finally, you add the panel"
[4] Page 349
The word add in "using the add method you have seen before" is in the wrong font.
[4] Page 353
In the first API note, change int cols to int columns
Change code lines 75 - 78 to 聽聽聽聽聽 JSpinner timeSpinner = new JSpinner(new 聽聽聽聽聽聽聽聽聽聽聽 SpinnerDateModel(new Date(), null, null, Calendar.HOUR) 聽聽聽聽聽聽聽聽聽聽聽 { 聽聽聽聽聽聽聽聽聽聽聽聽聽聽 public void setCalendarField(int field) {} 聽聽聽聽聽聽聽聽聽聽聽 });
[4] Page 405
In the explanation for the maximum parameter of the javax.swing.SpinnerDateModel constructor, change "The maximum valid value, or null if no lower bound..." to "The maximum valid value, or null if no upper bound..."
[4] Page 412
In the second line from the bottom, change JPopup to JPopupMenu.
[4] Page 422
Below line 28, add a line
add(panel, BorderLayout.CENTER);
[4] Page 432
Change
panel.add(style, bold);
to
panel.add(component, constraints);
[6] Page 443
The bulleted list is wrong (with different errors in two printings). Here is the correct version:
Connecting the west side of the component with the west side of the container;
Traversing the width of the component;
Connecting the east side of the component with the west side of the container.
Change "...to the given side of the start container" to "...to the given side of the startcomponent"
[4] Page 457
Change "The icon is a warning icon" to "The icon is a question icon". Change WARNING_MESSAGE to QUESTION_MESSAGE
[6] Page 509
Change 鈥淣OTE: The strings used when you define the parameters with the param tag and those used in the getParameter method must match exactly. In particular, both are case sensitive.鈥?to 鈥淣OTE: A case-insensitive comparison is used when matching the name attribute value in the param tag and the argument of the getParameter method.鈥?
[6] Page 522, 524
Change
public Enumeration getApplets() { return null; }
to
public Enumeration<Applet> getApplets() { return null; }
and
public Iterator getStreamKeys() { return null; }
to
public Iterator<String> getStreamKeys() { return null; }
[6] Page 547
Change
defaultSettings.put("color.red", "0 50 50");
to
defaultSettings.put("color.red", "0");
[4] Page 567
Change se.setCause(e) to se.initCause(e)
[4] Page 571
Change the numbers after StackTraceTest.java: from 8 23 / 8 14 23 / 8 14 14 23 to 17 33 / 17 23 33 / 17 23 23 33
Change void addXxxListener(XxxEvent) to void addXxxListener(XxxListener).
[4] Page 615
Change "displays all instance fields of the evt variable" to "displays all instance fields of the event variable"
[4] Page 630
In the second line of Table 12-2, change b17a16a15... to b17b16a15...
[6] Page 632
Change 鈥淭he advantage of having the RandomAccessFile class implement both DataInput and DataOutput is that this lets you use or write methods whose argument types are the DataInput and DataOutput interfaces.鈥?to 鈥淭he RandomAccessFile class implements both DataInput and DataOutput. It is a good idea to use these interfaces for method parameters.鈥?
[4] Page 634
Change Set<String, CharSet> to Map<String, CharSet>.
[5] Page 639
In the API description for CharBuffer decode(ByteBuffer buffer), change "decodes the given character sequence ..." to "decodes the given byte sequence"
[4] Page 658
In the second line from the bottom, change long int nbytes to long nbytes.
[4] Page 660
Lines 76, 77 of the code should be 聽聽聽聽聽 Raises the salary of this employee. 聽聽聽聽聽 @param byPercent the percentage of the raise
[4] Page 667
Change "The java.util.Date class defines its own readObject/writeObject methods" to "The serializable java.util.Date class defines its own writeObject method". (The wording in the book was correct, but it confused some readers into thinking that Date is externalizable.)
[4] Page 688
In the documentation for createNewFile, change "automatically creates" to "atomically creates".
[4] Page 713
In the second line of the section Generic Code and the Virtual Machine, change "was even able compile" to "was even able to compile".
[4] Page 719
In the third line from the top, change new Pair<String>(10) to new Pair<String>[10]
[4] Page 720
In the tenth line from the bottom, change
Pair<Employee> = ArrayAlg...
to
Pair<Employee> result = ArrayAlg...
[6] Page 723
Change void set(? super Manager) ? super Manager get() to void setFirst(? super Manager) ? super Manager getFirst()
[6] Page 723
Change "with any Manager object (or a subtype such as Executive), but not with an Employee" to "with any value of type Manager, Employee, or Object, but not with a subtype value such as Executive."
[6] Page 726
Change 鈥淥f course, in this case, we were not compelled to use a wildcard鈥攖here is nothing wrong with using a type parameter, as in the swapHelper method.鈥?to 鈥淥f course, in this case, we were not compelled to use a wildcard. We could have directly implemented <T> void swap(Pair<T> p) as a generic method without wildcards.鈥?
[4] Page 735
Add an entry
enum
an enumerated type
3
[6] Page 743
Change "Boolean, 42, 46, 186, 735" to two entries "boolean, 42, 46, 735" and "Boolean, 186"
[6] Page 760
Change "true or false, seeBoolean" to "true or false, seeboolean"
Seventh Edition Volume 2 (JDK 5.0)
[3] Page xvii
In the second line from the bottom, change Example 5-8 to Example 5-12
[4] Page 3
Change "inside the move method of the Ball class." to "inside the addBall method of the BounceFrame class".
Page 12 BounceThread.java
Remove these lines:
203. public static final int STEPS = 1000;
204. public static final int DELAY = 3;
[3] Page 19
Change "of its parent thread, that is, the thread that started it" to "of the thread that constructed it"
[2] Page 30
Change "You must make sure that the thread cannot be interrupted between the test and the insertion." to "You must make sure that no other thread can modify the balance between the test and the transfer action."
[2] Page 40
Remove the first four lines after Synchronized Blocks "However, a Java object ... only one condition".
[2] Page 41
Apply boldface to synchronized (lock) and remove it from System.out.println(. . .)
[2] Page 42
Change $1,200 to $200 and $1,300 to $300
[2] Page 43
In Figure 1-6, change 1200 to 200 and 1300 to 300
[3] Page 49
Change "The call Object head = q.poll(...) returns true for 100 milliseconds ..." to "The call Object head = q.poll(...) tries for 100 milliseconds ..."
[2] Page 64
In the code just above the API notes, change taks.size() to tasks.size().
[4] Page 100
In the API notes for the remove method of java.util.List<E>, change "removes and returns an element at the specified position" to "removes and returns the element at the specified position"
[4] Page 100
In the API notes for java.util.List<E>, add the following before E set(int i, E element):
E get(int i) returns the element at the specified position.
[3] Page 130 Code line 98
Change
return offset < elements.length;
to
return offset < count;
[4] Page 152, 153 ThreadedEchoServer.java
Remove lines 43, 86. Change the following lines:
22. Runnable r = new ThreadedEchoHandler(incoming);
44. public ThreadedEchoHandler(Socket i) 47. incoming = i;
[4] Page 166
In the API note of void setConnectTimeout(int timeout)/int getConnectTimeout(), change "...the read method of the associated input stream..." to "...the connect method of the associated input stream...". In the API note of void setReadTimeout(int timeout)/int getReadTimeout(), change "...the connect method of the associated input stream..." to "...the read method of the associated input stream...".
Page 175
The Scanner class wraps the InterruptedIOException. For greater clarity, change Scanner in = new Scanner(s.getInputStream()); String line = in.nextLine(); to InputStream in = s.getInputStream();// read from in
[2] Page 229
Change "gets a description of all tables in a catalog..." to "returns a description of all tables in a catalog..."
[2] Page 229
Change "The catalog and schema parameters..." to "The catalog and schemaPattern parameters..."
[3] Page 240
Change
stat.releaseSavepoint(svpt)
to
conn.releaseSavepoint(svpt)
[2] Page 244
In the last two rectangles in the bottom row of Figure 4-9, change ou=people to ou=groups
[4] Page 281
Product.java is the wrong version. The companion code has the correct version, but it is too long to fit in its entirety. Use this abbreviated version:
import java.rmi.*;
public interface Product extends Remote
{
/**
Gets the description of this product.
@return the product description
*/
String getDescription() throws RemoteException;
final int MALE = 1;
final int FEMALE = 2;
final int BOTH = MALE + FEMALE;
}
[4] Page 282
ProductImpl.java is the wrong version. The companion code has the correct version, but it is too long to fit in its entirety. Use this abbreviated version:
import java.rmi.*;
import java.rmi.server.*;
public class ProductImpl extends UnicastRemoteObject implements Product
{
public ProductImpl(String n, int s, int age1, int age2, String h) throws RemoteException
{
name = n;
ageLow = age1;
ageHigh = age2;
sex = s;
hobby = h;
}
public boolean match(Customer c)
{
if (c.getAge() < ageLow || c.getAge() > ageHigh)
return false;
if (!c.hasHobby(hobby)) return false;
if ((sex & c.getSex()) == 0) return false;
return true;
}
public String getDescription() throws RemoteException
{
return "I am a " + name + ". Buy me!";
}
private String name, hobby;
private int ageLow, ageHigh, sex;
}
[3] Page 293
Change
name = (String) data.get();;
to
name = (String) data.get();
[4] Page 294, 295
ProductImpl.java is the wrong version. The companion code has the correct version, but it is too long to fit in its entirety. Use this abbreviated version:
import java.io.*;
import java.rmi.*;
import java.rmi.activation.*;
public class ProductImpl
extends Activatable
implements Product
{
/**
Constructs a product implementation
@param id the activation id
@param data the marshalled construction parameter (containing the product name)
*/
public ProductImpl(ActivationID id, MarshalledObject data)
throws RemoteException, IOException, ClassNotFoundException
{
super(id, 0);
name = (String) data.get();
System.out.println("Constructed " + name);
}
public String getDescription() throws RemoteException
{
return "I am a " + name + ". Buy me!";
}
private String name;
}
[4] Page 296
Change
static Remote register(ActivationDescriptor desc)
to
static Remote register(ActivationDesc desc)
[4] Page 311
Change
System.out.println(orb.object_to_string(impl));
to
System.out.println(orb.object_to_string(ref));
[2] Page 334
Remove the line
JLabel label = new JLabel();
[4] Page 391
Add return this; as the last line of getTableCellRendererComponent so that the code looks like this:
class ColorTableCellRenderer extends JPanel implements TableCellRenderer
{
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column)
{
setBackground((Color) value);
if (hasFocus)
setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
else
setBorder(null);
return this;
}
}
[2] Page 425
Change "on the CD" to "in the companion code"
[3] Page 439
In Fig. 6-48, change the callout "minimize icon" to "maximize icon"
[4] Page 443
Change 鈥淭he JDesktopPane class has no method to return the selected frame. Instead, you must traverse all frames ...鈥?to 鈥淭raverse all frames ...鈥? (Actually, you can get the selected frame by calling JDesktopPane.getSelectedFrame, but we need its index.)
[4] Page 462
Change "... drawn by the CubicCurve3D class ..." to "... drawn by the CubicCurve2D class ..."
[3] Page 462
Change "between 2180 and 180" to "between -180 and 180"
[3] Page 664
Example 8-10: ChartBean2BeanInfo.java has the wrong file. The correct file is
package com.horstmann.corejava;
import java.awt.*; import java.beans.*;
/** The bean info for the chart bean, specifying the icons and the customizer. */ public class ChartBean2BeanInfo extends SimpleBeanInfo { public BeanDescriptor getBeanDescriptor() { return new BeanDescriptor(ChartBean2.class, ChartBean2Customizer.class); }
public Image getIcon(int iconType) { String name = ""; if (iconType == BeanInfo.ICON_COLOR_16x16) name = "COLOR_16x16"; else if (iconType == BeanInfo.ICON_COLOR_32x32) name = "COLOR_32x32"; else if (iconType == BeanInfo.ICON_MONO_16x16) name = "MONO_16x16"; else if (iconType == BeanInfo.ICON_MONO_32x32) name = "MONO_32x32"; else return null; return loadImage("ChartBean2_" + name + ".gif"); } }
[4] Page 705
Change http://bugs.sun.com/developer/bugParade/bugs/4030988.html to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4030988
[4] Page 772
Change
int outputSize= cipher.getOutputSize(inLength);
to
int outputSize= cipher.getOutputSize(blockSize);
[3] Page 788
In the fourth line from the bottom, change "the java.text class" to "the java.textpackage"
[3] Page 807
In the 4th line from the bottom (excluding the CAUTION note), change 10.0E7 to 10.0E8.
[4] Page 811
Change java -encoding Big5 Myfile.java to javac -encoding Big5 Myfile.java.
[2] Page 833
In line 17 of the code for HelloNative.h, change ifdef to #ifdef
[3] Page 836
Change ... a format string "%w.pf" ... to ... a format string "%w.pf" ... (w and p should be Roman italic)
]]>浣跨敤netbeans5.5鏈夋劅http://www.tkk7.com/livahu/archive/2006/08/30/66632.htmllivahulivahuWed, 30 Aug 2006 04:08:00 GMThttp://www.tkk7.com/livahu/archive/2006/08/30/66632.htmlhttp://www.tkk7.com/livahu/comments/66632.htmlhttp://www.tkk7.com/livahu/archive/2006/08/30/66632.html#Feedback1http://www.tkk7.com/livahu/comments/commentRss/66632.htmlhttp://www.tkk7.com/livahu/services/trackbacks/66632.html鏈変簡涓涓媙etbeans5.5鎰熻姣?.0濂藉浜?浠庝腑鏈変簺灝忕殑浣撲細,鍐欏嚭鏉ヤ笌澶у鍒嗕韓,鍚屾椂涔熷笇鏈涘ぇ瀹惰兘浠庝腑寰楀埌涓浜涙彁紺烘垨甯姪
1.netbeans5.5涓枃澶皬,姣旇緝涓?鍙互榪欎釜鏀硅繃鏉?/strong> ====================================== 瀵硅繖涓枃浠惰繘琛岀紪杈憂etbeans-5.5beta2\etc\netbeans.conf 鍏堝垹闄や互鍓嶉噷闈㈢殑鎵鏈夊唴瀹瑰啀澶嶅埗浠ヤ笅鍐呭 # ${HOME} will be replaced by JVM user.home system property netbeans_default_userdir="${HOME}/.netbeans/5.5beta2"
# options used by netbeans launcher by default, can be overridden by explicit # command line switches netbeans_default_options="-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-ea -J-Dapple.laf.useScreenMenuBar=true --fontsize 13" # --- tips for more advanced options you could use --- # for JDKs where it is supported (for example Sun's JDK 5.0 and newer), # you can use the following set of options which enable Concurrent Mark and # Sweep garbage collection algorithm and improve UI responsiveness # (see FAQ item http://www.netbeans.org/kb/faqs/performance.html#FaqGCPauses) #netbeans_default_options="-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled" # ---
# default location of J2SE JDK, can be overridden by using --jdkhome <dir> switch netbeans_jdkhome="D:\Program Files\Java\jdk1.5.0_08"
# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices) #netbeans_extraclusters="/absolute/path/to/cluster1:/absolute/path/to/cluster2"
緙栬瘧鍣ㄦ姤閿?璇存棤娉曞皢Product涓殑prt(java.util.List<java.lang.String>)搴旂敤浜?java.util.List<java.lang.Integer>)銆傚墠闈㈠畾涔変簡List<Integer> list = new ArrayList<Integer>()錛涘悗闈㈠嵈璋冪敤 public void prt(List<String> lt)鐢╨ist鍋氬弬鏁幫紝鑲畾鏄敊璇殑鐢ㄦ硶銆傜紪璇戝櫒鎶ラ敊鐨勮涓烘槸寰堟紜殑錛屼粬甯姪浣犻伩鍏嶄簡娼滃湪閿欒鐨勫彂鐢熴傝繖閲岃娉ㄦ剰娉涘瀷鐨勪綔鐢細List<Integer>鍜孡ist<String>铏界劧鐪嬬潃閮芥槸List錛屼絾緙栬瘧鍣ㄦ妸浠栦滑褰撲綔涓嶅悓鐨刢lass錛屼笉鑳界浉浜掓浛浠c傝繖鏄硾鍨嬬殑鍩烘湰鍘熷垯銆備綘鍙互鎶婁粬浠湅鎴愪竴涓槸Class1錛?涓涓槸Class2錛?褰撶劧涓嶈兘緇欎竴涓渶瑕佺被鍨嬩負Class1鐨勫弬鏁扮殑鏂規硶浼犱竴涓被鍨嬩負Class2鐨勫弬鏁扮殑鏂規硶鍟︺?
]]>The 10 Things You Need to Know About Java SE 6 'Mustang' http://www.tkk7.com/livahu/archive/2006/08/28/66206.htmllivahulivahuMon, 28 Aug 2006 08:16:00 GMThttp://www.tkk7.com/livahu/archive/2006/08/28/66206.htmlhttp://www.tkk7.com/livahu/comments/66206.htmlhttp://www.tkk7.com/livahu/archive/2006/08/28/66206.html#Feedback0http://www.tkk7.com/livahu/comments/commentRss/66206.htmlhttp://www.tkk7.com/livahu/services/trackbacks/66206.html
The 10 Things You Need to Know About Java SE 6 'Mustang'
Need a digest, summary, compressed form, precis of what's up with Java SE 6 'Mustang', currently in beta ?
All developers get first class support for writing XML web service client applications. No messing with the plumbing, you can expose your APIs as .NET interoperable web services with a simple annotation. Not your style ? Want to handle the XML directly ? Knock yourself out: Mustang adds new parsing and XML to Java object mapping APIs, previously only available in Java EE implementations or the Java Web Services Pack.
2. Scripting
You can now mix in JavaScript with your Java Source code, useful for prototyping, or when you have teams with a variety of skill sets. More advanced developers can plug in their own scripting engines, and mix their favorite scripting language in with Java as they see fit.
Perhaps You ThougHt yOu couldN't program with a scripting language and Java togetheR. Which will yoUBe trYing ? 3. Database
All developers get the updated JDBC 4.0, which is a new upgrade of a well-used API, focusing mainly on making it easier to use, although there are many feature additions like special support for XML as an SQL datatype, and better integration of BLOBs and CLOBs into the APIs. My favorite ease of use things include removal of some JDBC boilerplate, and some of the new annotations which make SQL strings embed better into your JDBC application. Like decorating your getAllUsers() method with an @Query(sql="select * from user") annotation, and that being all you need.
4. More Desktop APIs
Much has been said about this spoonful of sugar (to go with the desktop team's cake), so I will only skim a little. GUI developers get a large number of new tricks to play like the ever popular yet newly incorporated SwingWorker utility to help you with threading in GUI apps, JTable sorting and filtering and a new facility for quick splash screens to quieten impatient users.
5. Monitoring and Management
Really the big deal here is that you don't need do anything special to the startup to be able to attach on demand with any of the monitoring and management tools in Java SE. Mustang adds yet more diagnostic information, and we cobundled the infamous memory heap analysis tool jhat for forensic explorations of those core dumps.
6. Compiler Access
Really aimed at people who create tools for Java development, and for frameworks like JSP or PHP engines that need to generate a bunch of classes on demand, the compiler API opens up programmatic access to javac for in-process compilation of dynamically generate Java code. Not directly intended for the everyday developer, but for those of you deafened by your screaming inner geek, roll up your sleeves and give it a try. And the rest of us will happily benefit from the tools and the improved Java frameworks that use this.
7. Pluggable Annotations
Its becoming a running joke in Java circles, at least some that contain me, that for every wished for feature missing in Java, there's a budding annotation that will solve the problem. Joke no more, because Java tool and framework vendors can put a different smile on your face, defining their own annotations and have core support for plugging in and executing the processors that do the heaving lifting that can make custom annotations so cool.
8. Desktop Deployment
Those of you deploying applications to the desktop will soon discover that its a tale of a large number of smaller changes that add up to a big difference to existing applications. Like better platform look & feels in Swing, LCD text rendering, and snappier GUI performance overall.聽 Java apps can integrate better with the native platform with things like new access to the System Tray and Start menu of the platform.聽 At long last, Mustang unifies the Java Plugin and Java WebStart engines which just makes sense. Java WebStart application installation got a much needed makeover.
9. Security
You can have all the security features you like in the platform (and Mustang adds a few more, like the XML-DSIG APIs for creating and manipulating digital signatures), but if you don't have well supported security administrators, your security may be at risk. So Mustang has simplified the job of its security administrators by providing various new ways to access platform native security services such as native PKI and cryptographic services on Windows for secure authentication and communication, GSS/Kerberos services for authentication, and access to LDAP servers for authenticating users.
10. The Ilities: Quality, Compatibility, Stability
You probably knew that Sun has done regular feature releases of the Java SE platform over the last 10 years, so we certainly feel like we've built up some expertise in this area (the ever growing 80,000 test cases and several million lines of code testing conformance being just one aspect of our testing activity), but different from the last release, you probably noticed that people have been downloading snapshots of Mustang for the last fifteen (not just six) months. And what's more they've been filing bugs. And what's even more we've (and some of you!) been fixing them as we go. We're even challenging people to find more. So unlike previous releases, before we even got to beta, we'd fixed a number of quality and regression issues. Doesn't that add up to a better product ? Oh, and by the way, performance is looking better than Java SE 5 'Tiger'. Already..
So now you know all you need to know. Go on, try it !