* @throws MisconfigurationException
*/
public static String[] makeExecutableCommandStrWithVMArgs(String jythonJar, String script, String basePythonPath,
String vmArgs, String... args) throws IOException, JDTNotAvailableException, MisconfigurationException {
IInterpreterManager interpreterManager = PydevPlugin.getJythonInterpreterManager();
String javaLoc = JavaVmLocationFinder.findDefaultJavaExecutable().getCanonicalPath();
File file = new File(javaLoc);
if (file.exists() == false) {
throw new RuntimeException("The java location found does not exist. " + javaLoc);
}
if (file.isDirectory() == true) {
throw new RuntimeException("The java location found is a directory. " + javaLoc);
}
if (!new File(jythonJar).exists()) {
throw new RuntimeException(com.aptana.shared_core.string.StringUtils.format(
"Error. The default configured interpreter: %s does not exist!", jythonJar));
}
InterpreterInfo info = (InterpreterInfo) interpreterManager.getInterpreterInfo(jythonJar,
new NullProgressMonitor());
//pythonpath is: base path + libs path.
String libs = SimpleRunner.makePythonPathEnvFromPaths(info.libs);
FastStringBuffer jythonPath = new FastStringBuffer(basePythonPath, 128);