ProcessBuilder.start and spaces invoking "net.exe" in Windows

H

Hoss Spence

Hi,

Having problem invoking this command.

The code looks like the following

ProcessBuilder pb = new ProcessBuilder(pExecutableArgs);
pb.start();

where pExecutableArgs is a List which contains
[c:\WINDOWS\system32\net.exe, start, SQL Server (ABC)] e.g. a list
with three elements.

It appears to be choking on the spaces on "SQL Server (ABC"). I've
tried quoting this but that doesn't work either. Any ideas?
 
H

Hoss Spence

Hi,

Having problem invoking this command.

The code looks like the following

ProcessBuilder pb = new ProcessBuilder(pExecutableArgs);
pb.start();

where pExecutableArgs is a List which contains
[c:\WINDOWS\system32\net.exe, start, SQL Server (ABC)] e.g. a list
with three elements.

It appears to be choking on the spaces on "SQL Server (ABC"). I've
tried quoting this but that doesn't work either. Any ideas?

Oops... sorry for post. Quotes worked.
 
R

Roedy Green

It appears to be choking on the spaces on "SQL Server (ABC"). I've
tried quoting this but that doesn't work either. Any ideas?

That is unbalanced. Please post your actual code. The devil is in the
details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top