java - Filewriter-Printwriter not working with jar on linux -
i have pieace of code:
calendar ca=calendar.getinstance(); filewriter fw = new filewriter("locations_elapsed time iterations.txt", true); printwriter pw = new printwriter(fw); ca.settime(new date()); a++; pw.write("user " + + " " + ca.get(calendar.millisecond)); pw.println(); pw.close();
it works fine when run netbeans (ofcourse). want execute on server away machine works linux, make jar file this.
the problem is not writing anything. ideas?
thanks!
i can't comment yet: can give little more detail happens when launch jar? how launch it? file calling stored?
@ first glance think don't have exception handling , cannot see file hasn't been found or on like.
way, suggest (for testing purposes) use files.write
Comments
Post a Comment