Platform.getOS() on FreeBSD
Boris Hollas
boris.hollas at gmx.de
Thu Aug 13 18:15:49 UTC 2009
Hi,
I had big trouble running the OcaIDE plugin on FreeBSD 7.2 with Eclipse
3.4.1 from ports until I discovered these lines in the plugin source
public static boolean runningOnLinuxCompatibleSystem() {
String os = Platform.getOS();
return (os.equals(Platform.OS_LINUX) || os.equals(Platform.OS_MACOSX));
}
and replaced them with
public static boolean runningOnLinuxCompatibleSystem() {
String os = Platform.getOS();
return (os.equals(Platform.OS_LINUX) || os.equals(Platform.OS_MACOSX) ||
os.equals(Platform.OS_FREEBSD));
}
(see http://ocaml.eclipse.free.fr/forum/viewtopic.php?f=3&t=216).
Now everything seems to work.
My questions:
- Does Platform.OS_FREEBSD return Platform.getOS() only in the Eclipse
version created by the FreeBSD-Eclipse team
or is this built into Eclipse by default?
- If the former is true, is os.equals(Platform.OS_FREEBSD) portable code
or will it produce a compiler error on non-FreeBSD systems?
- Do the Eclipse developers know about the problem?
- What should I suggest to the OcaIDE developers to ensure portability of
the plugin's code?
Best regards,
Boris
More information about the freebsd-eclipse
mailing list