@Test public void testGetJavaPathname() { assertEquals(IOUtils.appendToPath(System.getProperty("java.home"), "bin", "java" + LauncherLifecycleCommands.getExecutableSuffix()), getLauncherLifecycleCommands().getJdkToolPathname("java" + LauncherLifecycleCommands.getExecutableSuffix(), new GemFireException() { })); }
protected String getJConsolePathname() { return getJdkToolPathname("jconsole" + getExecutableSuffix(), new JConsoleNotFoundException(CliStrings.START_JCONSOLE__NOT_FOUND_ERROR_MESSAGE)); }
protected String getJConsolePathname() { return getJdkToolPathname("jconsole" + getExecutableSuffix(), new JConsoleNotFoundException(CliStrings.START_JCONSOLE__NOT_FOUND_ERROR_MESSAGE)); }
protected String getJVisualVMPathname() { if (SystemUtils.isMacOSX()) { try { return IOUtils.verifyPathnameExists("/System/Library/Java/Support/VisualVM.bundle/Contents/Home/bin/jvisualvm"); } catch (FileNotFoundException e) { throw new VisualVmNotFoundException(CliStrings.START_JVISUALVM__NOT_FOUND_ERROR_MESSAGE, e); } } else { // Linux, Solaris, Windows, etc... try { return getJdkToolPathname("jvisualvm" + getExecutableSuffix(), new VisualVmNotFoundException(CliStrings.START_JVISUALVM__NOT_FOUND_ERROR_MESSAGE)); } catch (VisualVmNotFoundException e) { if (!SystemUtils.isJavaVersionAtLeast("1.6")) { throw new VisualVmNotFoundException(CliStrings.START_JVISUALVM__EXPECTED_JDK_VERSION_ERROR_MESSAGE); } throw e; } } }
protected String getJVisualVMPathname() { if (SystemUtils.isMacOSX()) { try { return IOUtils.verifyPathnameExists("/System/Library/Java/Support/VisualVM.bundle/Contents/Home/bin/jvisualvm"); } catch (FileNotFoundException e) { throw new VisualVmNotFoundException(CliStrings.START_JVISUALVM__NOT_FOUND_ERROR_MESSAGE, e); } } else { // Linux, Solaris, Windows, etc... try { return getJdkToolPathname("jvisualvm" + getExecutableSuffix(), new VisualVmNotFoundException(CliStrings.START_JVISUALVM__NOT_FOUND_ERROR_MESSAGE)); } catch (VisualVmNotFoundException e) { if (!SystemUtils.isJavaVersionAtLeast("1.6")) { throw new VisualVmNotFoundException(CliStrings.START_JVISUALVM__EXPECTED_JDK_VERSION_ERROR_MESSAGE); } throw e; } } }