List of utility methods to do FileLock
void | unlock(FileLock lock) unlock lock.channel().close(); |
void | unlockFile() unlock File try { if (lock != null) { lock.release(); channel.close(); f.delete(); Runtime.getRuntime().exec("cmd /c taskkill /F /IM rmiregistry.exe"); System.out.println("Shutdown & Unlock finish successfully."); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); |
void | unlockFile() unlock File try { if (lock != null) { lock.release(); channel.close(); f.delete(); } catch (IOException e) { e.printStackTrace(); ... |