If you are an ABAP programmer on a Mac (like me), you might have installed Eclipse ADT and SAP GUI for Java.
However; when you try to view a SAP GUI Window within Eclipse, you probably got an error saying that JavaFX can’t be located by Eclipse.
Here is a step-by-step solution to this problem.
First, you need to locate the JavaFX library path – which came with SAP GUI for Java. On my Mac, it is located at /Applications/javafx-sdk-11.0.1/lib . Please note that the /lib suffix is important.
Now, ensure that Eclipse is not running, and locate the file Eclipse.app . On my Mac, it is located at /Applications/eclipse/java-2021-03/Eclipse.app . Right-click this file and select “Show Package Contents”. Here, you need to edit Contents/Eclipse/eclipse.ini . You need to add the following lines to the end of the file:
--add-modules=ALL-MODULE-PATH --module-path=/Applications/javafx-sdk-11.0.1/lib --add-exports=javafx.web/com.sun.webkit.dom=ALL-UNNAMED
Obviously, –module-path points to your JavaFX library path.
Bonus info: While you are in eclipse.ini; you can remove the following lines to make Eclipse fonts bigger.
That’s all! Save your .ini file, start Eclipse and try to open a SAP GUI window. Works fine on my Mac.
Leave a Reply