Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

JavaFX 13 and Eclipse

pokrakam
Active Contributor

I have done a clean install of macOS Catalina and installed the latest Java SE 13 and JavaGUI, and Eclipse.

SAPGUI works fine on it's own. Eclipse also works, I can do any ADT-Native stuff. But when Eclipse tries to open a SAPGUI tab I get an error

The system reqirements are not met.
Could not find: javafx.properties
in: /Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home/lib
Your Java Virtual Machine seems not to support JavaFX, required to run the SAP
GUI for Java 7.50 rev 8.

This is the same issue as already described here: https://answers.sap.com/questions/787056/javafx-11-and-eclipse-issue.html

But when I apply the same solution Eclipse doesn't start. Running it from a terminal I can see the reason:

% ./eclipse                                                     
Error occurred during initialization of boot layer
java.lang.LayerInstantiationException: Package jdk.internal.jimage.decompressor in both module jrt.fs and module java.base
%

The path I added was the javafx in the SAPGUI installation, because it is the only one on my entire system:

% find /System/Volumes/Data -name javafx.properties 2> /dev/null
/System/Volumes/Data/Applications/SAP Clients/SAPGUI 7.50rev8/SAPGUI 7.50rev8.app/Contents/Resources/jre/Contents/Home/lib/javafx.properties
%

Any ideas?

1 ACCEPTED SOLUTION

ysoethoff
Product and Topic Expert
Product and Topic Expert

Unfortunately this constellation is not possible. The SAP GUI (Java GUI) installation includes a complete JRE incl. JavaFX. This leads to issues while using this specific JavaFX version in ADT, that is based on a different JDK.

So, you have two options:

  • Use the included JRE incl. JavaFX of the SAP GUI for ADT:
    Therefore you have to adjust / add the -vm parameter inside the eclipse.ini.
    Add the -vm right before the -vmargs. (The described arguments in the mentioned issue are not necessary for this solution):
-vm
<path_to_jre_bin_of_SAPGUI>
-vmargs
...
  • Download and refer a matching JavaFX version:
    You are using a JDK with the version 13.0.2. Therefore you need a matching JavaFX installation. You can download it here: https://openjfx.io/
    Refer to it in the eclipse.ini as described in the mentioned issue, but also add the following argument:
--add-modules=ALL-MODULE-PATH
--module-path=<path_to_lib_folder_of_JavaFX>
--add-exports=javafx.web/com.sun.webkit.dom=ALL-UNNAMED

On side note: Currently, ADT is not official supporting Java 13. We are not expecting any issues, but we cannot guarantee a bug-free usage.

Best regards,
Yannic

4 REPLIES 4

ysoethoff
Product and Topic Expert
Product and Topic Expert

Unfortunately this constellation is not possible. The SAP GUI (Java GUI) installation includes a complete JRE incl. JavaFX. This leads to issues while using this specific JavaFX version in ADT, that is based on a different JDK.

So, you have two options:

  • Use the included JRE incl. JavaFX of the SAP GUI for ADT:
    Therefore you have to adjust / add the -vm parameter inside the eclipse.ini.
    Add the -vm right before the -vmargs. (The described arguments in the mentioned issue are not necessary for this solution):
-vm
<path_to_jre_bin_of_SAPGUI>
-vmargs
...
  • Download and refer a matching JavaFX version:
    You are using a JDK with the version 13.0.2. Therefore you need a matching JavaFX installation. You can download it here: https://openjfx.io/
    Refer to it in the eclipse.ini as described in the mentioned issue, but also add the following argument:
--add-modules=ALL-MODULE-PATH
--module-path=<path_to_lib_folder_of_JavaFX>
--add-exports=javafx.web/com.sun.webkit.dom=ALL-UNNAMED

On side note: Currently, ADT is not official supporting Java 13. We are not expecting any issues, but we cannot guarantee a bug-free usage.

Best regards,
Yannic

pokrakam
Active Contributor

Hi Yannic,

Great stuff the first option was the simplest and worked. For what it's worth, I didn't specifically go after the latest Java. 13.0.2 is what macOS Catalina refers to by default - when you first attempt to use Java it sends you to Oracle's download page for it.

To make it easier for anyone else, here are my edits:

eclipse.ini is located in

/Applications/Eclipse.app/Contents/Eclipse

It can be edited from the command line, but for those not comfortable with it, one can also right-click on the Eclipse app and select 'Show Package Contents' to open it via Finder.

I added the two lines before -vmargs:

-vm
/Applications/SAP Clients/SAPGUI/SAPGUI.app/Contents/Resources/jre/Contents/Home/bin
-vmargs

Thanks,

Mike

This worked for me (Big Sur)

adding -vm is not necessary, in my case it didn't even run eclipse

this should be path to javafx.properties, not just javafx

--module-path=<path_to_lib_folder_of_JavaFX>

so in my case:

--module-path=/Library/Java/JavaVirtualMachines/javafx-sdk-11.0.2/lib

0 Kudos

Update Information for Mac OS 14.3 (23D56).
---
With Java version 20, I added the JAVAFX 21.0.2 for aarch64 in

 

/Library/Java/JavaVirtualMachines/jdk-20.jdk/Contents/Home/lib/javafx-sdk-21.0.2

 

I added in that .zshrc:

 

export PATH_TO_FX=/Library/Java/JavaVirtualMachines/jdk-20.jdk/Contents/Home/lib/javafx-sdk-21.0.2/lib

 

After that, I tested successfully with 

 

java --module-path $PATH_TO_FX --add-modules javafx.controls HelloFX

 

2024-01-30_17-49-20.jpg

... and add finally in ecplipse.ini

 

-vmargs
[...]something else[...]
--add-modules=ALL-MODULE-PATH
--module-path=/Library/Java/JavaVirtualMachines/jdk-20.jdk/Contents/Home/lib/javafx-sdk-21.0.2/lib
--add-exports=javafx.web/com.sun.webkit.dom=ALL-UNNAMED

 

Thx for previous information.