• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Installing JavaFX on Mac

 
Ranch Hand
Posts: 50
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings, everyone.

I've downloaded JavaFX for Mac to my computer from the Gluon website, but it doesn't come with an installer. It's just a zip file full of files.

In Oracle's instructions for installing JavaFX on a Mac, it mentions an installer, so I went back to make sure that I downloaded the correct package, and it appears I did (javafx-sdk-14.0.1). There's no installer in there.

What are my next steps for getting this installed? Manually copying them to the right place? Where would that be on a Mac?


 
Ken Austin
Ranch Hand
Posts: 50
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Per Oracle, the default location for JavaFX is here:

For Mac OS X. The default installation directory is /Library/Frameworks/JavaFX.framework/Versions/ version-number.



Should I be okay manually moving those files to that location? Does anything else need to get done?
 
Rancher
Posts: 167
7
Mac OS X IntelliJ IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure but you might find it easier to use Maven:

https://openjfx.io/openjfx-docs/#maven
 
Ken Austin
Ranch Hand
Posts: 50
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're probably right.

Since I am starting from scratch (again), I thought it might be a better idea to learn how to do everything manually before I moved to Maven and an IDE. However, it would get me over this hurdle.
 
Ken Austin
Ranch Hand
Posts: 50
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I successfully installed Maven on my computer.

I saved the sample pom file and the HelloFX.java files to the directory where I've been doing all of my coding.

When I ran the command from the website "mvn clean javafx:run", I go the following error:


[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.3:run (default-cli) on project hellofx: Error: Output directory is empty, compile first -> [Help 1]
[ERROR]



When I tried to compile HelloFX.java, I got multiple errors. Here are the first five:

HelloFX.java:1: error: package javafx.application does not exist
import javafx.application.Application;
                        ^
HelloFX.java:2: error: package javafx.scene does not exist
import javafx.scene.Scene;
                  ^
HelloFX.java:3: error: package javafx.scene.control does not exist
import javafx.scene.control.Label;
                          ^
HelloFX.java:4: error: package javafx.scene.layout does not exist
import javafx.scene.layout.StackPane;
                         ^
HelloFX.java:5: error: package javafx.stage does not exist
import javafx.stage.Stage;



What is my next step? (By the way, I tried manually placing the JavaFX files in the directories specified by Oracle and that didn't work.)

 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic