I am working with Java 8 application. I am trying to create a file. When I deploy the war in jboss 10 server and start it, file is not generated. At second run file is generated. Can someone please help me over this? My code for file generation is:
File workletProps = new File(configDir, DBConstants.OfflineWorkletExportProperties.WORKLET_EXPORT_CONFIG_WORKLET_PROPERTIES.getGettypeValue() +".properties");
PrintWriter pw = new PrintWriter(workletProps);
pw.println("WORKLET_ID=" + worklet.getId());
pw.println("PROJECT_ID=" + worklet.getProject().getId());
pw.flush();
pw.close();