command line - How to start a process from Java with arguments which contain double-quotes -
i need start second java process java program, , 1 of arguments forked process need contain literal double-quote characters ( " ). how do in portable way, i.e. @ least works on linux , windows? i tried use processbuilder (which introduced overcome problems of runtime class, right?) array of strings command line, still there problem parameter containing quote: list<string> commandline = new arraylist<string>(); commandline.add(new file(system.getproperty("java.home") + "/bin/java").getabsolutepath()); commandline.addall(arrays.aslist("-jar", "plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar", "-application", "org.eclipse.equinox.p2.director", "-repository", "http://download.eclipse.org/releases/juno")); commandline.add("-list"); commandline.add("q:select(x | x.id == \"org.eclipse.sdk.ide\")"); new processbuilder().command(commandline).d...