Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Problem with using Java 11 on Mac
Problem with using Java 11 on Mac [message #1810237] Mon, 05 August 2019 16:11 Go to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Howdy,

I'm using Java 11 on Mac and installed e(fx)clipse latest from marketplace into eclipse 2019-6. After creating project, however, the javafx.* classes cannot be imported...i.e. their reference in Main has compile error.

I've seen that Java 11 removed JavaFX from the main distro...is this what's causing this problem? Either way, how is it best fixed with Java 11 on mac?

Scott

[Updated on: Mon, 05 August 2019 16:11]

Report message to a moderator

Re: Problem with using Java 11 on Mac [message #1810238 is a reply to message #1810237] Mon, 05 August 2019 16:55 Go to previous messageGo to next message
Dieter Engelhardt is currently offline Dieter EngelhardtFriend
Messages: 23
Registered: June 2016
Junior Member
I guess you'll find a solution here https://openjfx.io/
Re: Problem with using Java 11 on Mac [message #1823732 is a reply to message #1810238] Wed, 01 April 2020 02:19 Go to previous message
Andrew Scott is currently offline Andrew ScottFriend
Messages: 5
Registered: April 2020
Junior Member
Dieter Engelhardt, cmon that's just plain lazy and also that does not provide an answer I've been there. To use anything above Java 8 requires much more (I beleive) unnecessary work and detailed instruction. I tried for two nights to get it working before piecing together the parts from various sources in to one clear and comprehensive instruction. Although, I instruction is written for Windows, I know it also works on a Mac too because I own one and it worked there too. I do this everytime I create a JavaFX project, and its bloody annoying.

Creating a Java FX Project
Go through this step for each new Java FX project to be built. First, go to file > new > other and find the option for creating a new Java FX Project. Once the project is created you will notice it does not compile as Eclipse needs to know about the JavaFX libraries.
Access the project properties and then find the Java build path. Select the Libraries tab and then module path. Then select the add library button and then select the user library option before pressing next.
On the window that appears select new and name the library JavaFX13. Select add external jars and then find the lib folder of your JavaFX 13 installation directory and select all of the .jar folders then apply and close or finish on all windows.
If you attempt to run the project you will find it will not be able to find application.main. To fix this we have one last step. Right click main.java in Eclipse's package explorer. Select run as > run configurations and then select the arguments tab. In the vm arguments add the following (where the module path points to the lib your installation of the Java FX sdk):
--module-path C:\ Java\javafx-sdk-13.0.1\lib --add-modules=ALL-MODULE-PATH

Previous Topic:Upgrading e(fx)clipse plugin based app to OpenJDK and OpenJFX
Next Topic:no "new JavaFX project" after e(fx)clipse installation
Goto Forum:
  


Current Time: Fri Dec 13 15:46:41 GMT 2024

Powered by FUDForum. Page generated in 0.05720 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top