Reputation: 316
All,
I have my optaplanner application using JavaFX. Running and testing it in IntelliJ's IDE was not the problem, but generating an application from it was really painful. Mainly due to the combination of the (modular) JavaFX modules with other non-modular libraries : JavaFX is modular, my application isn't (nor is optaplanner). So I had to generate a custom JRE including the JavaFX modules, and only then, using that custom JRE, build my application using that runtime. I was quite helped in this (and its integration in maven) by this link : https://github.com/dlemmermann/JPackageScriptFX . Generation of my application succeeded, and I can execute it.
But. My application, upon clicking a problem(/solution) file, processes that file to display the score. So drools pops in. And drools apparently wants the java compiler. Only 1 problem : my application's JRE (in the custom image generated during the build) doesn't include one. So I receive the following error message (/exception) :
Exception in thread "JavaFX Application Thread" org.kie.memorycompiler.KieMemoryCompilerException: Cannot find the System's Java compiler. Please use JDK instead of JRE or add drools-ecj dependency to use in memory Eclipse compiler
Adding that drools-ecj dependency to my project's pom.xml hasn't fixed the problem. Adding the option --bind-services to jlink seems to work, but I want to avoid having to generate too big an application image. I could probably include an extra module in my custom JRE, but I lack the knowledge to figure out which one. So my question : how could I get this issue solved ?
Upvotes: 2
Views: 223
Reputation: 27322
If you're using a ConstraintProvider, upgrade to OptaPlanner 8.24 or later and switch to constraintStreamType=BAVET
(see docs how to), to avoid needing Drools.
We did a similar trick to get OptaPlanner running on Android.
Upvotes: 0