0

I'm trying to convert a dotx file to docx file using this programme Converting a file with ".dotx" extension (template) to "docx" (Word File), it's working in Window 7 but when i try to run it in window 10 or windows server 2016, i get this error :

enter image description here

Please, If there is any suggestion, do not hesitate.

Thank You !

PS: I'm using Office 2013.

youssef elhayani
  • 625
  • 8
  • 28
  • 2
    Your question is not clear. My code works using `apache poi 4.0.1` which in my case runs using `Java 8`. This should not be dependent on different operating systems. So the question is does your `Windows 7` system, using which it works, using another `apache poi` and/or `java` version than your `Windows 10` or `Windows Server 2016` system. – Axel Richter Mar 04 '19 at 11:49
  • @Axel Richter does apach POI depend on the Java version ? – youssef elhayani Mar 04 '19 at 12:04
  • It should not. But maybe? It is my only suspicion to explain your issue. – Axel Richter Mar 04 '19 at 12:09

1 Answers1

0

After reading the POI documentation, I figure out that there is a correlation between the POI version and JDK Version,I thought that the problem is in the operation system but it's not true, in other Machine i was using JDK 1.7 with apache POI 4.0.1. The Right combination is :

POI 4.0 and later require JDK version 1.8 or later.

POI 3.11 and later 3.x versions require JDK version 1.6 or later.

POI 3.5 to 3.10 required the JDK version 1.5 or later. Versions prior to 3.5 required JDK 1.4+.

see more in https://poi.apache.org/devel/index.html

youssef elhayani
  • 625
  • 8
  • 28