日期:2014-05-18 浏览次数:20613 次
#!/bin/sh
cd /usr/local/tomcat/apache-tomcat-7.0.39/webapps/oops/Oops/34/c_all_qr_8e243677-6238-4150-9484-c057f3d90830/Answer/1120120745/Safla/project/src
javac Main.java
/usr/java/jdk1.6.0_30/bin/java Main C 9 >> /usr/local/tomcat/apache-tomcat-7.0.39/webapps/oops/Oops/34/c_all_qr_8e243677-6238-4150-9484-c057f3d90830/Answer/1120120745/Safla/out/C/4.txt
Exception in thread "main" java.lang.NoClassDefFoundError: Main
this is getErrorStream:
Caused by: java.lang.ClassNotFoundException: Main
this is getErrorStream:
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
this is getErrorStream:
at java.security.AccessController.doPrivileged(Native Method)
this is getErrorStream:
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
this is getErrorStream:
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
this is getErrorStream:
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
this is getErrorStream:
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
this is getErrorStream:
Could not find the main class: Main. Program will exit.
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
public class ProcessBuilderTest {
public static void main(String[] args) throws IOException {
ProcessBuilder pb = new ProcessBuilder("java", "Test2");
pb.director