public String getDefaultJavaPath () {
        JavaInfo javaVersion;

        if (OSUtils.getCurrentOS() == OS.MACOSX) {
            javaVersion = JavaFinder.parseJavaVersion();

            if (javaVersion != null && javaVersion.path != null)
                return javaVersion.path;
        } else if (OSUtils.getCurrentOS() == OS.WINDOWS) {
            javaVersion = JavaFinder.parseJavaVersion();

            if (javaVersion != null && javaVersion.path != null)
                return javaVersion.path.replace(".exe", "w.exe");
        }

        // Windows specific code adds <java.home>/bin/java no need mangle javaw.exe here.
        return System.getProperty("java.home") + "/bin/java";
    }