I'm using Java with Apache POI to create a word document based on an ArrayList. Everything works, except that I want that the specific Word document opens itself after it is created. Does anyone know a method or simply how I can achieve this
try{
FileOutputStream outStream = new
FileOutputStream("CarteBoissons.docx");
XWPFDocument doc = new XWPFDocument();
XWPFParagraph paraTit = doc.createParagraph();
XWPFRun paraTitRun = paraTit.createRun();
paraTitRun.setBold(true);
paraTitRun.setFontSize(20);
paraTitRun.setText("CARTE BOISSONS" +
"" +
"" +
"");
doc.write(outStream);
outStream.close();
JOptionPane.showMessageDialog(null, "Le document Word a été créé");
}catch(Exception e){
JOptionPane.showMessageDialog(null, e);
}