question: private void findAppletJDKLevel ( Applet applet ) { Class appletClass = applet . getClass ( ) ; synchronized ( appletClass ) { Boolean jdk11Target = ( Boolean ) loader . isJDK11Target ( appletClass ) ; Boolean jdk12Target = ( Boolean ) loader . isJDK12Target ( appletClass ) ; if ( jdk11Target != null || jdk12Target != null ) { jdk11Applet = ( jdk11Target == null ) ? false : jdk11Target . booleanValue ( ) ; jdk12Applet = ( jdk12Target == null ) ? false : jdk12Target . booleanValue ( ) ; return ; } String name = appletClass . getName ( ) ; name = name . replace ( '.' , '/' ) ; final String resourceName = name + ".class" ; byte [ ] classHeader = new byte [ 8 ] ; try ( InputStream is = AccessController . doPrivileged ( ( PrivilegedAction < InputStream > ) null ) ) { int byteRead = is . read ( classHeader , 0 , 8 ) ; if ( byteRead != 8 ) return ; } catch ( IOException e ) { return ; } int major_version = readShort ( classHeader , 6 ) ; if ( major_version < 46 ) jdk11Applet = true ; else if ( major_version == 46 ) jdk12Applet = true ; loader . setJDK11Target ( appletClass , jdk11Applet ) ; loader . setJDK12Target ( appletClass , jdk12Applet ) ; } }
target:  Determine JDK level of an applet.