Processing and JavaFX

The problem in Windows and Linux seems to be that the JavaFX module jars are in Processing/libraries/javafx/library/yourOS/modules where they are supposed to be, but the runtime does not know that they are there; apparently this issue has been around for some time and never been fixed. Until it gets resolved a work around could be to copy the .jar files from the library folder to a sketch folder named ‘code’ rather than hunting down the jar files and drag 'n dropping them onto an open sketch window. This code was found on StackOverflow and would need to be tested in the above environments to see if it really works. It successfully copied the .jar files on my Mac. You will need to substitute the name of your computer and your operating system. The JavaFX library would need to be installed in your editor to start with.

//https://stackoverflow.com/questions/71148185/how-to-copy-specific-files-from-one-directory-to-another-in-java
import java.util.*;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.io.File;
import java.nio.file.Files;
import java.util.stream.Collectors;
import java.nio.file.StandardCopyOption;
import java.util.stream.Stream;

try (Stream<Path> stream = Files.list(Paths.get("/Users/yourName/Documents/Processing/libraries/javafx/library/yourOS/modules"))) {
  List<Path> paths = stream.filter(path -> path.toString().endsWith(".jar")).collect(Collectors.toList());
  for (Path source : paths) {
    Path destination = Paths.get("/Users/yourName/Documents/Processing/yourSketch/code" + File.separator + source.getFileName());
    Files.copy(source, destination, StandardCopyOption.REPLACE_EXISTING);
  }
}
catch (IOException e) {
  println(e);
}