@@ -596,16 +596,31 @@ static private List<String> buildSketchLibraryClassPath(JavaMode mode,
596596 static private List <String > buildJavaRuntimeClassPath () {
597597 StringBuilder classPath = new StringBuilder ();
598598
599- // Java runtime
600- String rtPath = System .getProperty ("java.home" ) +
601- File .separator + "lib" + File .separator + "rt.jar" ;
602- if (new File (rtPath ).exists ()) {
603- classPath .append (File .pathSeparator ).append (rtPath );
604- } else {
605- rtPath = System .getProperty ("java.home" ) + File .separator + "jre" +
599+ { // Java runtime
600+ String rtPath = System .getProperty ("java.home" ) +
606601 File .separator + "lib" + File .separator + "rt.jar" ;
607602 if (new File (rtPath ).exists ()) {
608603 classPath .append (File .pathSeparator ).append (rtPath );
604+ } else {
605+ rtPath = System .getProperty ("java.home" ) + File .separator + "jre" +
606+ File .separator + "lib" + File .separator + "rt.jar" ;
607+ if (new File (rtPath ).exists ()) {
608+ classPath .append (File .pathSeparator ).append (rtPath );
609+ }
610+ }
611+ }
612+
613+ { // JavaFX runtime
614+ String jfxrtPath = System .getProperty ("java.home" ) +
615+ File .separator + "lib" + File .separator + "ext" + File .separator + "jfxrt.jar" ;
616+ if (new File (jfxrtPath ).exists ()) {
617+ classPath .append (File .pathSeparator ).append (jfxrtPath );
618+ } else {
619+ jfxrtPath = System .getProperty ("java.home" ) + File .separator + "jre" +
620+ File .separator + "lib" + File .separator + "ext" + File .separator + "jfxrt.jar" ;
621+ if (new File (jfxrtPath ).exists ()) {
622+ classPath .append (File .pathSeparator ).append (jfxrtPath );
623+ }
609624 }
610625 }
611626
0 commit comments