mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 11:21:06 +01:00
Add JavaFX runtime to error checker class path
In case somebody needs to work with native FX windows or events, here they are, ready to be imported (like AWT stuff).
This commit is contained in:
@@ -596,16 +596,31 @@ public class PreprocessingService {
|
||||
static private List<String> buildJavaRuntimeClassPath() {
|
||||
StringBuilder classPath = new StringBuilder();
|
||||
|
||||
// Java runtime
|
||||
String rtPath = System.getProperty("java.home") +
|
||||
File.separator + "lib" + File.separator + "rt.jar";
|
||||
if (new File(rtPath).exists()) {
|
||||
classPath.append(File.pathSeparator).append(rtPath);
|
||||
} else {
|
||||
rtPath = System.getProperty("java.home") + File.separator + "jre" +
|
||||
{ // Java runtime
|
||||
String rtPath = System.getProperty("java.home") +
|
||||
File.separator + "lib" + File.separator + "rt.jar";
|
||||
if (new File(rtPath).exists()) {
|
||||
classPath.append(File.pathSeparator).append(rtPath);
|
||||
} else {
|
||||
rtPath = System.getProperty("java.home") + File.separator + "jre" +
|
||||
File.separator + "lib" + File.separator + "rt.jar";
|
||||
if (new File(rtPath).exists()) {
|
||||
classPath.append(File.pathSeparator).append(rtPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{ // JavaFX runtime
|
||||
String jfxrtPath = System.getProperty("java.home") +
|
||||
File.separator + "lib" + File.separator + "ext" + File.separator + "jfxrt.jar";
|
||||
if (new File(jfxrtPath).exists()) {
|
||||
classPath.append(File.pathSeparator).append(jfxrtPath);
|
||||
} else {
|
||||
jfxrtPath = System.getProperty("java.home") + File.separator + "jre" +
|
||||
File.separator + "lib" + File.separator + "ext" + File.separator + "jfxrt.jar";
|
||||
if (new File(jfxrtPath).exists()) {
|
||||
classPath.append(File.pathSeparator).append(jfxrtPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user