Java tutorial
//package com.java2s; import java.io.File; import java.net.URL; public class Main { public static String getFileName(URL url) { File f = new File(url.getFile()); return f.getName(); } }