Java tutorial
//package com.java2s; import java.io.File; public class Main { private static final String JAR_FILE_EXT = ".jar"; private static boolean isJarFile(File file) { return file.getName().contains(JAR_FILE_EXT); } }