Hi

I'm trying to compile and run a java program through a different java program.
I actually succeeded in doing so using the following code:
CODE
String[] st = {"C:\\Program Files\\Java\\jdk1.6.

3\\bin\\javac.exe", "C:\\Users\\admin\\Documents\\sort\\src\\Sort.java"};
Process p = Runtime.getRuntime().exec(st);
String[] st1 = {"C:\\Program Files\\Java\\jdk1.6.

3\\bin\\java.exe", "Sort"};
Process p1 = Runtime.getRuntime().exec(st1, null, new File("C:\\Users\\admin\\Documents\\sort\\src"));
There's more code for printing, but it isn't relevant.
My problem is trying to do this without the file section in the p1 Process. I want to use the classpath option.
I tried the following code (and many different versions of it) but it didn't work:
CODE
String[] st = {"C:\\Program Files\\Java\\jdk1.6.

3\\bin\\javac.exe", "C:\\Users\\admin\\Documents\\sort\\src\\Sort.java"};
Process p = Runtime.getRuntime().exec(st);
String[] st1 = {"C:\\Program Files\\Java\\jdk1.6.

3\\bin\\java.exe","-classpath C:\\Users\\admin\\Documents\\sort\\src", "Sort"};
Process p1 = Runtime.getRuntime().exec(st1);
Although no exception is thrown the Sort class doesn't run and the following is printed:
Unrecognized option: -classpath C:\Users\admin\Documents\sort\src
help will be much appreciated..
thanks.