简体   繁体   中英

JDK location on MacBook Air and Jar files for JavaFx?

I am trying to convert an existing Java project to a JAVAFX project but I am unable to find JRE folder in Macbook Air with M1 chip and hence I am unable to add fx libraries to the existing project according to the below link:

https://www.javatpoint.com/javafx-with-eclipse

Can someone please help me as I am new to Macbook?

Currently (2021-02-07) there is only a JDK for macOS that runs on Intel... so it will be running under the Rosetta 2 emulation, but it should work. (This will change soon, as the ARM port for macOS is well underway)

Install a build of Open JDK for macOS that includes JavaFX. I suggest the Open JDK build produced by Azul called Zulu. Be sure to get the full version with FX. That just simplifies things related to the JavaFX modules. If you use a typical build of OpenJDK, follow the instructions on OpenJFX.io to build your app with Gradle or Maven so it properly includes JavaFX.

If you have the JDK properly installed it will be found in /Library/Java/JavaVirtualMachines/

With modern Java you won't find Jar files for JavaFX or anything else in there because the classes will be delivered as Modules, not Jars. (a la JPMS)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM