Running Java Class from Terminal
How to run Java class in Terminal How to run Java class in Terminal This is to create and run one or more java files on terminal that is depends on third-party jars. This helps to quickly test some features on real environment without running E2E flow of your application. Write java file that you want to run FileCleanupUtil.java package codergists; import org.apache.commons.io.filefilter.AgeFileFilter; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Date; import java.util.stream.Stream; import static java.time.LocalDate.now; import static java.time.ZoneId.systemDefault; import static java.util.Date.from; import static org.apache.commons.io.FileUtils.deleteDirectory; import static org.apache.commons.io.FileUtils.listFilesAndDirs; /** * Utility class cleanup archived session files which are older than 2 weeks * * @author tvajjala */ public class FileCleanupUtil { /** * Threshold time */