Java realtime writing file when it's opened
问题 I want to write data to file when it's opened, but it doesn't work. Calendar getTime works nice, System.out.println() proves this. Please, any idea, what's wrong...? Main class: public static void main(String[] args) throws IOException { // TODO code application logic here CurrentTime ct = new CurrentTime(); } CurrentTime class: public class CurrentTime { public OutputStream output; public InputStream input; public Process npp; CurrentTime() throws IOException { Timer t = new Timer(); npp =