Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8211068

rmic does not support classes compiled with the option --enable-preview

XMLWordPrintable

    • b30

        Files compiled with the option --enable-preview can't be processed by rmic due to a new class file version format introduced by JEP 12: Preview Language and VM Features -
        NoCloneImpl.java
        -----------
        class NoCloneImpl extends java.rmi.server.UnicastRemoteObject implements NoClone
        {
          public NoCloneImpl() throws RemoteException { super();}
        }
        -----------
        The 2nd command
        1. javac --release 12 --enable-preview NoCloneImpl.java
        2. rmic NoCloneImpl.class
        throws the exception:
        Warning: generation and use of skeletons and static stubs for JRMP
        is deprecated. Skeletons are unnecessary, and static stubs have
        been superseded by dynamically generated stubs. Users are
        encouraged to migrate away from using rmic to generate skeletons and static
        stubs. See the documentation for java.rmi.server.UnicastRemoteObject.
        error: Invalid class file format in NoCloneImpl.class. The major.minor version '56.65535' is too recent for this tool to understand.
        error: Class NoCloneImpl not found.
        2 errors

        The expected behavior is either to inform that the tool does not support class files that depend on the preview VM features of Java SE N, or to support a minor_version item that has all 16 bits set(?)
         

              smarks Stuart Marks
              lkuskov Leonid Kuskov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: