목록분류 전체보기 (556)
른록노트
0 0 0 0 0 0초 분 시 일 요일 년도 참고사이트http://fmd1225.tistory.com/60
// TO CHECK WHETHER A FILE IS OPENED // OR NOT (not for .txt files) // the file we want to check String fileName = "C:\\Text.xlsx"; File file = new File(fileName); // try to rename the file with the same name File sameFileName = new File(fileName); if(file.renameTo(sameFileName)){ // if the file is renamed System.out.println("file is closed"); }else{ // if the file didnt accept the renaming oper..
String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) { if(tempFile.isFile()) { String tempPath=tempFile.getParent(); String tempFileName=tempFile.getName(); System.out.println("Path="+tempPath); System.out.println("FileName="+tempFileName); /*** Do something withd tempPath and temp FileName ^^; ***/ } } 참고사이트http://samples-textcube.bl..
1. taskExcutor 변수를 저장하고 사용할 클래스를 만든다.2. 스프링.xml에서 bean을 지정한다3. 사용할 클래스에서 만들었던 변수를 사용하여 execute하여 사용한다 example)- TaskExecutorClass.javapublic class TaskExecutorClass{public static TaskExecutor taskExecutor;public TaskExecutorClass(TaskExecutor taskExecutor){this.taskExecutor = taskExecutor;}} - spring.xml - 사용할 클래스runnable은 실행할 작업을 작성해놓은 객체 TaskExecutorClass.taskExecutor.execute(runnable); 마지막으로 ..
참고사이트http://palpit.tistory.com/732 - threadpoolhttp://hochulshin.com/java-multithreading-thread-thread-implementation/http://happinessoncode.com/2017/10/09/java-thread-interrupt/ - thread 인터럽트
temp파일로 만들어도 자동으로 삭제되는게 아니라삭제명령어를 넣어줘야한다경로도 지정 할 수 있다 참고사이트http://dev.umejintan.com/9http://mentor75.tistory.com/entry/%EC%9E%84%EC%8B%9C%ED%8C%8C%EC%9D%BC%EC%9D%84-%EB%A7%8C%EB%93%A4%EA%B3%A0-%EC%A2%85%EB%A3%8C-%EC%8B%9C-%EC%82%AD%EC%A0%9C-%EB%B0%A9%EB%B2%95