hi im trying to do a program that will be able to access command prompt and be able to start solr's start.jar file so my search program could work..the problem is when im using the codes in eclipse, the program runs smoothly but when i transfered my program in netbeans it says that it cannot access the jar file.it doesnt give me any stack trace error that is why i dont know what is wrong..here is my code
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class CmdTest {
public static void main(String[] args) throws Exception {
ProcessBuilder builder = new ProcessBuilder(
"cmd.exe", "/c", "cd \"D:\\Downloads\\solr-4.2.1\\solr-4.2.1\\example\" && java -jar start.jar");
builder.redirectErrorStream(true);
Process p = builder.start();
BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while (true) {
line = r.readLine();
if (line == null) { break; }
System.out.println(line);
}
}
}
the error is just plainly like this : Error:Unable to access jarfile start.jar