0

because of what the console can be turned off?

                Process process;
                process = Process.Start(@"C:\Users\Bapcuk\source\repos\Server\Server\bin\Debug\Servers\MyServer\start.bat");
                process.WaitForExit();
                break;

code in .bat file - java -Xmx1024M -Xms1024M -jar server.jar PAUSE

  • Do you want to hide console window, or to redirect console output? – Dennis Dec 05 '18 at 11:11
  • 1
    `process.StartInfo.CreateNoWindow = true;` or `process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden` –  Dec 05 '18 at 11:12
  • Possible duplicate of [How can I start a process in the background?](https://stackoverflow.com/questions/31627801/how-can-i-start-a-process-in-the-background) –  Dec 05 '18 at 11:15
  • I want it not to close at startup – DiamondKesha Dec 05 '18 at 11:17

0 Answers0