| 77 | |
| 78 | |
| 79 | static public void init() { |
| 80 | try { |
| 81 | Class<?> platformClass = Class.forName("processing.app.Platform"); //$NON-NLS-1$ |
| 82 | if (Platform.isMacOS()) { |
| 83 | platformClass = Class.forName("processing.app.platform.MacPlatform"); //$NON-NLS-1$ |
| 84 | } else if (Platform.isWindows()) { |
| 85 | platformClass = Class.forName("processing.app.platform.WindowsPlatform"); //$NON-NLS-1$ |
| 86 | } else if (Platform.isLinux()) { |
| 87 | platformClass = Class.forName("processing.app.platform.LinuxPlatform"); //$NON-NLS-1$ |
| 88 | } |
| 89 | inst = (DefaultPlatform) platformClass.getDeclaredConstructor().newInstance(); |
| 90 | } catch (Exception e) { |
| 91 | Messages.showError("Problem Setting the Platform", |
| 92 | "An unknown error occurred while trying to load\n" + |
| 93 | "platform-specific code for your machine.", e); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | |
| 98 | static public void initBase(Base base) throws Exception { |