You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
p-bakker
changed the title
Switch to Java 9 for building Rhino, while generating Java 8 bytecode
Switch to Java 9 for compiling Rhino, while generating Java 8 compatible bytecode
Oct 22, 2021
This project is providing the org.mozilla.javascript.engine.RhinoScriptEngineFactory class as a javax.script.ScriptEngineFactory discoverable service (via META-INF/services). If the migration to Java 9+ has to be correct, that implies a full modularisation including a module-info.java file, which is where service providers are advertised now.
In that case, just requiring a compilation with Java 11 but targeting Java 8 bytecode would not work: one needs either a split compilation or Gradle toolchains.
Both approaches introduce complexities, the first one effectively kills incremental compilations (although that could be avoided by adding more complexity) and the second may end installing one or two JDKs into the .gradle home directory (JDKs that you may have already installed). There are implications for importing into IDEs as well.
In any case, the build would become more complex and the source layout must be modified. I'm 100% favourable to this but it would be a large and important change.
As mentioned by @gbrail in for example #1040 (comment)
The text was updated successfully, but these errors were encountered: