Issue
I saw this list of major version numbers for Java in another post:
- Java 1.2 uses major version 46
- Java 1.3 uses major version 47
- Java 1.4 uses major version 48
- Java 5 uses major version 49
- Java 6 uses major version 50
- Java 7 uses major version 51
- Java 8 uses major version 52
- Java 9 uses major version 53
- Java 10 uses major version 54
- Java 11 uses major version 55
- Java 12 uses major version 56
- Java 13 uses major version 57
- Java 14 uses major version 58
- Java 15 uses major version 59
- Java 16 uses major version 60
- Java 17 uses major version 61
- Java 18 uses major version 62
- Java 19 uses major version 63
Where does this list come from? Is there a specific reference for this? Preferably something that shows minor versions too?
Solution
These come from the class version. If you try to load something compiled for java 6 in a java 5 runtime you'll get the error, incompatible class version, got 50, expected 49. Or something like that.
See here in byte offset 7 for more info.
Additional info can also be found here.
Answered By - Michael
Answer Checked By - Senaida (JavaFixing Volunteer)