--- openjpeg-2.3.1/src/bin/jpip/CMakeLists.txt.orig	2019-04-04 03:43:35.698890000 -0400
+++ openjpeg-2.3.1/src/bin/jpip/CMakeLists.txt	2019-04-04 03:47:36.921116900 -0400
@@ -68,6 +68,7 @@ if(NOT DEFINED JAVA_TARGET_VERSION)
 endif()
 
 # Only build the java viewer if dev is found:
+if(NOT MINGW)
 if(Java_Development_FOUND AND Java_JAVAC_EXECUTABLE)
   set(jflags $ENV{JFLAGS})
   # search for package org.apache.xerces.parsers
@@ -159,3 +160,6 @@ if(Java_Development_FOUND AND Java_JAVAC
 else()
   message(WARNING "No java compiler found. Wont be able to build java viewer")
 endif()
+else()
+    message(WARNING "MINGW does NOT support JAVA. Will NOT build java viewer")
+endif(NOT MINGW)
