protected static String getSourceBySystem() { if (Platform.isWindows()) { return SRC_WINDOWS_KERNEL_STREAMING; } else if (Platform.isLinux()) { return SRC_VIDEO_FOR_LINUX_2; } else if (Platform.isMac()) { return SRC_QUICKTIME_KIT; } throw new IllegalStateException("Unsupported operating system"); }
private static NativeCalls getImplInstance() { if (Platform.isLinux()) { return new LinuxNativeCalls(); } if (Platform.isWindows()) { return new WinNativeCalls(); } if (Platform.isSolaris()) { return new SolarisNativeCalls(); } if (Platform.isMac()) { return new MacOSXNativeCalls(); } if (Platform.isFreeBSD()) { return new FreeBSDNativeCalls(); } return new POSIXNativeCalls(); }
public static final boolean isX11() { // TODO: check filesystem for /usr/X11 or some other X11-specific test return !Platform.isWindows() && !Platform.isMac(); } public static final boolean hasRuntimeExec() {
return file.getAbsolutePath(); if (Platform.isMac()) {
if (Platform.isMac()) { if (libName.startsWith("lib") && (libName.endsWith(".dylib")
if(Platform.isMac()) {
static boolean isWindowsType() { if (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD() || Platform.iskFreeBSD()) { return false; } else { return true; } } }
if (Platform.isMac()) { String orig, ext; if (path.endsWith("dylib")) {
if (!isFirstElement || !(Platform.isMac() && Platform.isPPC())) { alignment = Math.min(Native.MAX_ALIGNMENT, alignment);
else if (Platform.isMac() && !libraryName.endsWith(".dylib")) { LOG.log(DEBUG_LOAD_LEVEL, "Looking for matching frameworks"); libraryPath = matchFramework(libraryName);
LinkLayerAddress.getByAddress(ByteArrays.getSubArray(addr, 0, addrLength))); } else if ((Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD()) || Platform.iskFreeBSD() && sa_family == Inets.AF_LINK) { sockaddr_dl sdl = new sockaddr_dl(pcapAddr.addr.getPointer());
|| Platform.isAndroid() ? 8 : LONG_SIZE; MAX_PADDING = (Platform.isMac() && Platform.isPPC()) ? 8 : MAX_ALIGNMENT; System.setProperty("jna.loaded", "true");
public static final boolean isX11() { // TODO: check FS or do some other X11-specific test return !Platform.isWindows() && !Platform.isMac(); } }
public static final boolean isX11() { // TODO: check filesystem for /usr/X11 or some other X11-specific test return !Platform.isWindows() && !Platform.isMac(); } public static final boolean hasRuntimeExec() {
protected static String getSourceBySystem() { if (Platform.isWindows()) { return SRC_WINDOWS_KERNEL_STREAMING; } else if (Platform.isLinux()) { return SRC_VIDEO_FOR_LINUX_2; } else if (Platform.isMac()) { return SRC_QUICKTIME_KIT; } throw new IllegalStateException("Unsupported operating system"); }
@Override public void actionPerformed(ActionEvent arg0) { String path = TmmProperties.getInstance().getProperty("chooseplayer.path"); Path file = TmmUIHelper.selectFile(BUNDLE.getString("Button.chooseplayer"), path); //$NON-NLS-1$ if (file != null && Utils.isRegularFile(file) || Platform.isMac()) { tfMediaPlayer.setText(file.toAbsolutePath().toString()); TmmProperties.getInstance().putProperty("chooseplayer.path", file.toAbsolutePath().toString()); } } });
static void fdatasyncFd(int fd) throws IOException { int result; if (Platform.isMac()) { result = fcntl(fd, 51); // F_FULLFSYNC } else { result = fdatasync(fd); } if (result == -1) { throw lastErrorToException(); } }
private static String getClassPrefix() { return Platform.isWindows() ? "Win32" : Platform.isSolaris() ? "Sun" : (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD()) ? "BSD" : "Unix"; }
@Override protected boolean couldHandleThisVirtualMachine() { final boolean result; if (isFreeBSD() || isLinux() || isOpenBSD() || isSolaris() || isMac()) { result = PROCESS_PID_FIELD != null; } else { result = false; } return result; }
private static String getClassPrefix() { return Platform.isWindows() ? "Win32" : Platform.isSolaris() ? "Sun" : (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD()) ? "BSD" : "Unix"; }