Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-15738

Generate compiler options file to support Java11 in IDEA.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-beta1, 4.0
    • Build
    • None
    • Code
    • Low
    • Low Hanging Fruit
    • User Report
    • All
    • None
    • 4.0
    • Hide

      To test,

      Either a clean checkout or remove the .idea directory, then under Java8 and Java11 run ant generate-idea-files then load the project and compile.

      Under Java11, check Preferences -> Build, Execution, Deployment -> Java Compiler and there should be an entry underĀ Additional command line parameters: you should see

      --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
      

      Under Java8, no .idea/compiler.xml file should be generated.

      Show
      To test, Either a clean checkout or remove the .idea directory, then under Java8 and Java11 run ant generate-idea-files then load the project and compile. Under Java11, check Preferences -> Build, Execution, Deployment -> Java Compiler and there should be an entry underĀ  Additional command line parameters: you should see --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED Under Java8, no .idea/compiler.xml file should be generated.

    Description

      The change to JMX in CASSANDRA-15653 prevents the generated IDEA project from compiling under JDK11.

      Fix by adding options for a module (named after the checkout dir)

      <?xml version="1.0" encoding="UTF-8"?>
      <project version="4">
        <component name="JavacSettings">
          <option name="ADDITIONAL_OPTIONS_OVERRIDE">
            <module name="trunk" options="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED" />
          </option>
        </component>
      

      Attachments

        Activity

          People

            jmeredithco Jon Meredith
            jmeredithco Jon Meredith
            Jon Meredith
            Dinesh Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: