Here you can find the source of findJars(File folder)
folder
.
Parameter | Description |
---|---|
folder | the folder to analyze |
folder
public static List<File> findJars(File folder)
//package com.java2s; //License from project: Apache License import java.io.File; import java.util.ArrayList; import java.util.List; public class Main { /**/*from www . j a v a2 s.c o m*/ * Returns all JAR files in <code>folder</code>. * * @param folder the folder to analyze * @return all JAR files in <code>folder</code> */ public static List<File> findJars(File folder) { List<File> result = new ArrayList<File>(); File[] plugins = folder.listFiles(); if (null != plugins) { for (File f : plugins) { if (f.getName().endsWith(".jar")) { result.add(f); } } } System.out.println("JARS found: " + result.toString()); return result; } }