src/jdk.jpackage/share/native/libapplauncher/main.cpp
branchJDK-8200758-branch
changeset 57099 9a85a7a076ad
parent 57064 a7fdadf67a92
child 57106 ea870b9ce89a
equal deleted inserted replaced
57098:fd4868c5fca1 57099:9a85a7a076ad
   114             Package& package = Package::GetInstance();
   114             Package& package = Package::GetInstance();
   115             Macros::Initialize();
   115             Macros::Initialize();
   116             package.SetCommandLineArguments(argc, argv);
   116             package.SetCommandLineArguments(argc, argv);
   117             platform.SetCurrentDirectory(package.GetPackageAppDirectory());
   117             platform.SetCurrentDirectory(package.GetPackageAppDirectory());
   118 
   118 
   119             if (package.CheckForSingleInstance()) {
       
   120                 // reactivate the first instance if the process Id is valid
       
   121                 platform.reactivateAnotherInstance();
       
   122                 if (platform.GetSingleInstanceProcessId() != 0) {
       
   123                     return RunVM(SINGLE_INSTANCE_NOTIFICATION_LAUNCH);
       
   124                 }
       
   125                 return true;
       
   126             }
       
   127 
       
   128             switch (platform.GetAppCDSState()) {
   119             switch (platform.GetAppCDSState()) {
   129                 case cdsDisabled:
   120                 case cdsDisabled:
   130                 case cdsUninitialized:
   121                 case cdsUninitialized:
   131                 case cdsEnabled: {
   122                 case cdsEnabled: {
   132                     break;
   123                     break;
   202                     break;
   193                     break;
   203                 }
   194                 }
   204             }
   195             }
   205 
   196 
   206             // Run App
   197             // Run App
   207             result = RunVM(USER_APP_LAUNCH);
   198             result = RunVM();
   208         } catch (FileNotFoundException &e) {
   199         } catch (FileNotFoundException &e) {
   209             platform.ShowMessage(e.GetMessage());
   200             platform.ShowMessage(e.GetMessage());
   210         }
   201         }
   211 
   202 
   212         return result;
   203         return result;