jdk/src/java.base/windows/native/libjli/java_md.c
changeset 45062 37ed4313c8c1
parent 42755 902841117c87
equal deleted inserted replaced
45061:74b09ee3cd55 45062:37ed4313c8c1
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   156 void
   156 void
   157 CreateExecutionEnvironment(int *pargc, char ***pargv,
   157 CreateExecutionEnvironment(int *pargc, char ***pargv,
   158                            char *jrepath, jint so_jrepath,
   158                            char *jrepath, jint so_jrepath,
   159                            char *jvmpath, jint so_jvmpath,
   159                            char *jvmpath, jint so_jvmpath,
   160                            char *jvmcfg,  jint so_jvmcfg) {
   160                            char *jvmcfg,  jint so_jvmcfg) {
   161     char * jvmtype;
   161 
       
   162     char *jvmtype;
   162     int i = 0;
   163     int i = 0;
   163     int running = CURRENT_DATA_MODEL;
       
   164 
       
   165     int wanted = running;
       
   166 
       
   167     char** argv = *pargv;
   164     char** argv = *pargv;
   168     for (i = 1; i < *pargc ; i++) {
       
   169         if (JLI_StrCmp(argv[i], "-J-d64") == 0 || JLI_StrCmp(argv[i], "-d64") == 0) {
       
   170             wanted = 64;
       
   171             continue;
       
   172         }
       
   173         if (JLI_StrCmp(argv[i], "-J-d32") == 0 || JLI_StrCmp(argv[i], "-d32") == 0) {
       
   174             wanted = 32;
       
   175             continue;
       
   176         }
       
   177 
       
   178         if (IsJavaArgs() && argv[i][0] != '-')
       
   179             continue;
       
   180         if (argv[i][0] != '-')
       
   181             break;
       
   182     }
       
   183     if (running != wanted) {
       
   184         JLI_ReportErrorMessage(JRE_ERROR2, wanted);
       
   185         exit(1);
       
   186     }
       
   187 
   165 
   188     /* Find out where the JRE is that we will be using. */
   166     /* Find out where the JRE is that we will be using. */
   189     if (!GetJREPath(jrepath, so_jrepath)) {
   167     if (!GetJREPath(jrepath, so_jrepath)) {
   190         JLI_ReportErrorMessage(JRE_ERROR1);
   168         JLI_ReportErrorMessage(JRE_ERROR1);
   191         exit(2);
   169         exit(2);