()
| 334 | |
| 335 | |
| 336 | static public File getJavaHome() { |
| 337 | if (Platform.isMacOS()) { |
| 338 | //return "Contents/PlugIns/jdk1.7.0_40.jdk/Contents/Home/jre/bin/java"; |
| 339 | File[] plugins = getContentFile("../PlugIns").listFiles(new FilenameFilter() { |
| 340 | public boolean accept(File dir, String name) { |
| 341 | return dir.isDirectory() && |
| 342 | name.endsWith(".jdk") && !name.startsWith("."); |
| 343 | } |
| 344 | }); |
| 345 | return new File(plugins[0], "Contents/Home/jre"); |
| 346 | } |
| 347 | // On all other platforms, it's the 'java' folder adjacent to Processing |
| 348 | return getContentFile("java"); |
| 349 | } |
| 350 | |
| 351 | |
| 352 | /** Get the path to the embedded Java executable. */ |
no test coverage detected