I ran the same program with two different versions of
Solaris 8 and I am getting different results. "sunpal" is
the Generic Solaris. kapital is the latest solaris 2.8.
I have verified this on two systems for each case testing
it on a total of four systems.
# uname -a
SunOS sunpal 5.8 Generic sun4u sparc SUNW,Ultra-4
# /opt/jdk/bin/java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
# /opt/jdk/bin/java a | od -x
0000000 61c8 0a00
0000003
# uname -a
SunOS kapital 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-Enterprise
# /opt/jdk/bin/java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
# /opt/jdk/bin/java DifferentAnswers | od -x
0000000 613f 0a00
0000003
# java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_06, native threads, sunwjit)
# java DifferentAnswers | od -x
0000000 61c8 0a00
0000003
The program:
/**
* Two different Java VMs do not produce same result
*
*
* @see
*
* @author Rinaldo Di Giorgio
* @version %I%, %G%
*/
public class DifferentAnswers {
public static final char rs = 200;
/**
* Print the results below and the expected answer is
* a String with the value 0xC8 in it.
*
*
* @param argv
*
* @see
*/
public static void main(String argv[]) {
System.out.println("a" + rs);
}
}
=>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
69 bharadwaj (Srini) =>java DifferentAnswers
a?
70 bharadwaj (Srini) =>
javac DifferentAnswers.java
43 bharadwaj (Srini) =>java DifferentAnswers
aÈ
44 bharadwaj (Srini) =>java -version
java version "1.2.1"
Solaris VM (build Solaris_JDK_1.2.1_04c, native threads, sunwjit)
45 bharadwaj (Srini) =>
Solaris 8 and I am getting different results. "sunpal" is
the Generic Solaris. kapital is the latest solaris 2.8.
I have verified this on two systems for each case testing
it on a total of four systems.
# uname -a
SunOS sunpal 5.8 Generic sun4u sparc SUNW,Ultra-4
# /opt/jdk/bin/java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
# /opt/jdk/bin/java a | od -x
0000000 61c8 0a00
0000003
# uname -a
SunOS kapital 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-Enterprise
# /opt/jdk/bin/java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
# /opt/jdk/bin/java DifferentAnswers | od -x
0000000 613f 0a00
0000003
# java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_06, native threads, sunwjit)
# java DifferentAnswers | od -x
0000000 61c8 0a00
0000003
The program:
/**
* Two different Java VMs do not produce same result
*
*
* @see
*
* @author Rinaldo Di Giorgio
* @version %I%, %G%
*/
public class DifferentAnswers {
public static final char rs = 200;
/**
* Print the results below and the expected answer is
* a String with the value 0xC8 in it.
*
*
* @param argv
*
* @see
*/
public static void main(String argv[]) {
System.out.println("a" + rs);
}
}
=>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
69 bharadwaj (Srini) =>java DifferentAnswers
a?
70 bharadwaj (Srini) =>
javac DifferentAnswers.java
43 bharadwaj (Srini) =>java DifferentAnswers
aÈ
44 bharadwaj (Srini) =>java -version
java version "1.2.1"
Solaris VM (build Solaris_JDK_1.2.1_04c, native threads, sunwjit)
45 bharadwaj (Srini) =>
- relates to
-
JDK-4425642 Regression: Bad conversion of bytes above 127....
-
- Closed
-
-
JDK-4329387 file.encoding inconsistency between Solaris 2.6 and 2.7
-
- Closed
-