Compile classes to different language level? #13
-
Hello! I am currently making use of the JavaMemoryCompiler to generate some classes. I am running with Java 11 but need to generate Java 8 compatible code. Is it possible to configure the relevant target / release flags to be able to ensure Java 8 compatible classes are generated? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello! |
Beta Was this translation helpful? Give feedback.
Hello!
You can call the method
org.burningwave.core.classes.JavaMemoryCompiler.Compilation.Config.setVersion
on your configuration object: it will set the--release
flag.If you need to set other compiler parameters you can call the method
org.burningwave.core.classes.JavaMemoryCompiler.Compilation.Config.putExtraParameter