I'm a new be for java coding. I was trying my first code. I used this two lines of codes
printer = new PrintStream(new FileOutputStream("C:/Users/GM/Desktop/Out.docx", true));
printer = new PrintStream(new FileOutputStream("C:/Users/GM/Desktop/Out.txt", true));
and generated two files (a word file (Out.docx) and text file (Out.txt)) as output. The text file is working flawlessly. The word file opens in eclipse workstation but it doesn't open outside eclipse. My word processes are working properly. I tried both word 2012 and 2016. They doesn't open it. Is there any one out there who have the solution.