ProcessBuilder.command(String[])
instead of
ProcessBuilder.command(String)
would prevent the ProcessBuilder.exec from having troubles with splitting the command line, but it does not work. String[] cmd=new String[]{"java",
"-jar",
"mailer.jar"
"smtp.test.org",
"test@test.org",
"test@test.org",
"my subject ...",
"my content with carriage returns and other strange characters"};
String[] args=new String[]{
"smtp.test.org",
"test@test.org",
"test@test.org",
"my subject ...",
"my content with",
"carriage returns and",
"other strange characters",
...};
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.