FULL PRODUCT VERSION :
C:\Program Files\Java\jdk1.6.0_02\bin>java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
C:\Program Files\Java\jdk1.6.0_02\bin>ver
Microsoft Windows 2000 [Version 5.00.2195]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Bug also reproduces on a GNU/Linux box.
A DESCRIPTION OF THE PROBLEM :
javap is supposed to be able to handle miltiple class-names as its argument-list. However, for certain jre classes, the order seems to matter, as demonstrated below. The first time it works, whereas, with the same two class-names given in the other order, it reports an incorrect error.
C:\Program Files\Java\jdk1.6.0_02\bin>javap com.sun.image.codec.jpeg.ImageFormatException com.sun.crypto.provider.ai
Compiled from "ImageFormatException.java"
public class com.sun.image.codec.jpeg.ImageFormatException extends java.lang.RuntimeException{
public com.sun.image.codec.jpeg.ImageFormatException();
public com.sun.image.codec.jpeg.ImageFormatException(java.lang.String);
}
Compiled from "DashoA13*.."
final class com.sun.crypto.provider.ai extends javax.crypto.SealedObject{
static final long serialVersionUID;
com.sun.crypto.provider.ai(javax.crypto.SealedObject);
java.lang.Object readResolve() throws java.io.ObjectStreamException;
}
C:\Program Files\Java\jdk1.6.0_02\bin>javap com.sun.crypto.provider.ai com.sun.image.codec.jpeg.ImageFormatException
ERROR:Could not find com.sun.image.codec.jpeg.ImageFormatException
This bug seems to be there since, at-least, 1.4.2_12:
[vivek@laptop phd]$ /usr/java/j2sdk1.4.2_12/bin/javap sun.text.resources.DateFormatZoneData_th
Compiled from "DateFormatZoneData_th.java"
public final class sun.text.resources.DateFormatZoneData_th extends sun.text.resources.DateFormatZoneData{
public sun.text.resources.DateFormatZoneData_th();
public java.lang.Object[][] getContents();
}
[vivek@laptop phd]$ /usr/java/j2sdk1.4.2_12/bin/javap sun.text.resources.DateFormatZoneData_tr
Compiled from "DateFormatZoneData_tr.java"
public final class sun.text.resources.DateFormatZoneData_tr extends sun.text.resources.DateFormatZoneData{
public sun.text.resources.DateFormatZoneData_tr();
public java.lang.Object[][] getContents();
}
[vivek@laptop phd]$ /usr/java/j2sdk1.4.2_12/bin/javap sun.text.resources.DateFormatZoneData_tr sun.text.resources.DateFormatZoneData_th
Compiled from "DateFormatZoneData_tr.java"
public final class sun.text.resources.DateFormatZoneData_tr extends sun.text.resources.DateFormatZoneData{
public sun.text.resources.DateFormatZoneData_tr();
public java.lang.Object[][] getContents();
}
Compiled from "DateFormatZoneData_th.java"
public final class sun.text.resources.DateFormatZoneData_th extends sun.text.resources.DateFormatZoneData{
public sun.text.resources.DateFormatZoneData_th();
public java.lang.Object[][] getContents();
}
[vivek@laptop phd]$ /usr/java/j2sdk1.4.2_12/bin/javap sun.text.resources.DateFormatZoneData_th sun.text.resources.DateFormatZoneData_tr
ERROR:Could not find sun.text.resources.DateFormatZoneData_tr
Similarly, the bug has been verified with 1.5.0_08, with the same arguments as for 1.6.0_02. The bug was originally detected on a GNU/linux (Fedora distribution) machine, and reconfirmed on a Windows platform.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See description above.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
All invocations of javap in the description above should pass, whereas only some of them pass, whereas some others fail with an error that is not appropriate.
ACTUAL -
See description above.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
See description above.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Swap arguments !