Thanks Freeman. I've ended up using

new VMOption("-p"), new VMOption("/usr/lib/jvm/jfx1.11.0/lib"),
new VMOption("--add-modules"), new 
VMOption("javafx.base,javafx.controls,javafx.fxml,javafx.graphics")

Which seems to do the trick but I've got a Karaf start up issue now to solve:

Cannot access RandomAccessFile java.io.FileNotFoundException: /karaf.log 
(Permission denied) java.io.FileNotFoundException: /karaf.log (Permission 
denied)

Looks like it's looking in the root directory for the log file so something 
must be different about the configuration and need to work out what has changed 
(I've previously had the tests working under earlier versions of Karaf and Java)


Kerry

On 23/12/2018 23:21, Freeman Fang wrote:
>
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc. 
>
>
>
>
>
>> On Dec 24, 2018, at 4:38 AM, Kerry <karaf-u...@avionicengineers.com 
>> <mailto:karaf-u...@avionicengineers.com>> wrote:
>>
>> Hi,
>>
>> I'm trying to to get my project FlexFx to work on Java 11 with OpenJFX 11 
>> inside Karaf 4.2.2 and have so far managed to get it to work by manually 
>> deploying the OpenJFX jars to the `jdk9plus` folder of Karaf.
>>
>> I am now trying to update the integration tests which use Pax Exam and 
>> because JavaFX is no longer part of the JDK-11 I need to include these in 
>> the Karaf configuration. To begin with I tried this:
>>
>> bootClasspathLibraries(
>>     new 
>> BootClasspathLibraryOption(mavenBundle().artifactId(OPENJFX_BASE_ARTIFACT_ID).groupId(OPENJFX_GROUP_ID).version(OPENFX_VERSION)),
>>     new 
>> BootClasspathLibraryOption(mavenBundle().artifactId(OPENJFX_CONTROLS_ARTIFACT_ID).groupId(OPENJFX_GROUP_ID).version(OPENFX_VERSION)),
>>     new 
>> BootClasspathLibraryOption(mavenBundle().artifactId(OPENJFX_FXML_ARTIFACT_ID).groupId(OPENJFX_GROUP_ID).version(OPENFX_VERSION)))
>>
>> but this only put the artifacts into the lib folder not `lib/jdk9plus`
>
> Then I think you can add 
>
> new VMOption("-classpath"),
>                 new VMOption(“lib/whatever_yourlib_is")
>
>>
>> Also (and this is where I am still new and confused with the Java9 + module 
>> system) the above artifacts are not the actual ones I used when I manually 
>> installed OpenJFX to Karaf. I manually installed the SDK from gluon 
>> (https://gluonhq.com/products/javafx/) and this zip file includes native 
>> libraries as well as JARs. These are what I think I should be installing 
>> automatically but I'm uncertain how I can go about this with PaxExam.
>>
>> Does anyone have any suggestions?
>>
>> Thanks, Kerry.
>>
>>
>

Reply via email to