modules/jdk.packager/src/main/native/launcher/linux/launcher.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
  * All rights reserved. Use is subject to license terms.
  *
  * This file is available and licensed under the following license:
  *
  * Redistribution and use in source and binary forms, with or without

@@ -28,11 +28,11 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
+#include <X11/Xlib.h>
 #include <dlfcn.h>
 #include <locale.h>
 #include <string>
 #include <libgen.h>
 #include <stdio.h>

@@ -57,10 +57,11 @@
     return result;
 }
 
 int main(int argc, char *argv[]) {
     int result = 1;
+    XInitThreads();
     setlocale(LC_ALL, "en_US.utf8");
     void* library = NULL;
 
     {
         std::string programPath = GetProgramPath();