Here you can find the source of execName()
public static String execName()
//package com.java2s; import java.io.File; public class Main { public static String execName() { return isWindows() ? "rake.bat" : "rake"; }//w w w . j a v a2 s. c o m public static boolean isWindows() { String name = System.getProperty("os.name"); return name != null ? name.contains("Windows") : File.separatorChar == '\\'; } }