Java File get OS file separator
import java.io.File; public class Main { public static void main(String[] args) { System.out.println("File.separator:" + File.separator); }//ww w . ja va 2s . c o m }