JDK 9 Outreach

joe darcy joe.darcy at oracle.com
Tue Nov 24 04:01:59 UTC 2015


Hello,

A few comments...

On 11/23/2015 1:42 PM, dalibor topic wrote:
>
>
> On 11.09.2015 07:29, Mani Sarkar wrote:
>> Hi Dalibor,
>>
>> I have couple more suggestions to expand the great JDK 9 Outreach even
>> further:
>>
>> 1. The major version token in the output of  javap -verbose 
>> SomeClass, returns
>> 52 for both JDK 8 and JDK 9 compiled sources. It would be helpful to
>> mention this so everyone is aware of it, as no new byte codes have been
>> introduced in 9.
>
> Fwiw, there were no new bytecodes introduced in most new major 
> revisions of the Java platform. Those two things are not directly 
> related in that way.

It is true that typically no new byte code are introduced (even if some 
have gone away as well, jsr/ret RIP); however, we usually define a new 
class file version per platform release (JDK 7, 8, 9, etc.). Eve if they 
don't have new bytecodes, these new version define semantics for new JVM 
attributes which are discussed in the JVMS.

I would expect a new class file version to be defined later in JDK 9.

(Before modules, the class file version number served as a crude 
indicator of which version of the platform libraries a class depended on.)

>
> Please see the JVM specification, 'Class file format' for details.
>
>> In theory I could run JDK 9 compiled code in the JDK8
>> environment
>
> Yes, there is a JEP for that: http://openjdk.java.net/jeps/247 ;)

That is a bit different; that JEP is about better support for 
cross-compiling to older releases.

Cheers,

-Joe



More information about the adoption-discuss mailing list