Java tutorial
//package com.java2s; import java.util.StringTokenizer; public class Main { public static String GetFileName(String file) { StringTokenizer st = new StringTokenizer(file, "/"); while (st.hasMoreTokens()) { file = st.nextToken(); } return file; } }