S
S
SoloCheater2018-08-09 20:42:53
Java
SoloCheater, 2018-08-09 20:42:53

Can't open exe program cmd line in my java program. Detailed description of the problem in the question description. What to do?

Hello. There is code in my program:
ProcessBuilder pb = new ProcessBuilder("cmd", "\"/launcher/compute.exe\" --server *** --port *** --user *** --pass ** * --cuda_devices *** --intensity *** --templimit ***");
try
{
pb.start();
System.out.println("cmd started");
}
catch (IOException e)
{
System.out.println(e.getMessage());
}
I need the cmd line to open, and in it this command "/launcher/compute.exe" --server *** --port *** --user *** --pass *** --cuda_devices * ** --intensity *** --templimit ***
Instead of asterisks, your parameter data. "/launcher/compute.exe" - the path to the program, but not everything is so simple. This folder with files (exe and 2 dll files) must be packed into the Java program itself (that is, they must be in a jar file) and this exe must be opened from this jar file. Secondly, even when I make the absolute path to the D:\Desktop\launcher\compute.exe file, the hidden cmd line opens (it is visible in the task manager, but compute.exe itself is not, although if you separately create start.bat and paste there:
"/launcher/compute.exe" --server *** --port *** --user *** --pass *** --cuda_devices *** --intensity *** --templimit ***
Then the cmd line with this program is launched, I don't understand what it's all connected with.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergey, 2018-12-16
kuzmin @sergueik

looks like you just broke the poor cmd.exe!
don't try to feed it unix path separator it might get sick

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question