Consequences of running a Java class file on different JREs?

What are the consequences of running a Java class file compiled in JDK 1.4.2 on JRE 1.6 or 1.5?

+3
source share
8 answers

The Java SE 6 Compatibility page shows Jave SE 6 compatibility with Java SE 5.0. In addition, there is a link to Incompatibility in J2SE 5.0 (since version 1.4.2) . By reviewing the two documents, it should be possible to find out if there are any inconsistencies in programs written in JDK 1.4.2 and Java SE 6.

In terms of binary compatibility of Java class files, the Java SE 6 compatibility page has the following:

Java SE 6 J2SE 5.0, incompatibilities, . , , 5.0 JDK 6.

, , workmad3, Java, JDK, - . , Desty, API , .

Source Compatibilities:

API - , . javac , -nowarn . , , API, API JVMDI JVMPI.

Java SE 6 Performance White Paper.

+6

Java- , . , 1.5, JRE 1.6. , , java-, JRE (, Java7)

: , 1.6 JRE (1.3, 1.4 ..).

+5

Java . , JRE JRE . , , API JRE. , JRE 1.5 StringBuilder . , :

String s = "string1" + "string2";

:

String s = new StringBuilder("string1").append("string2").toString();

, NoClassDefFoundError StringBuilder.

+1
. , JVM . , .
0

, java. : " , " "OMG! ? (, , , , :)).

, , ( , ).

AFAIK, - java , , .

0

, 1.4 - , JVM ( , ).

0

. , 1.6, 1.3. i.e

input = "+ JOptionPane.showInputDialog(null," "+ (b?" encrypt ":" decrypt ") +". ", (b?" 4086 ":" 5317") );

,

input = "+ JOptionPane.showInputDialog(null," "+ (b?" encrypt ":" decrypt ") +".");

. inputdialog, , 1.3.

, 1.6 api 1.3 .

0

. , - , , Java API , , , , , . , , JDK 1.6 JRE 1.5, - JRE .

-2

Source: https://habr.com/ru/post/1697325/


All Articles