I have this code that compiles the class named tspClassName, when I compile using this code: < / P>
process compileProc = null; {CompileProc = Runtime.getRuntime (). Exec ("javac -classpath." + File. Separator + "src" + File.Sseparator + File.Sseparator + "Generate." + TspClassName + ".java -d." File. Separator + "Bin"); // hold exception if (compileProc.exitValue ()! = 0) {System.out.println ("compile exit status:" + compileProc.exitValue ()); System.err.println ("compile error:" + compileProc.getErrorStream ());
It outputs: "Collect exclusion status: 2 compilation error: java.io.FileInputStream@17182c1" class tspClassName.java compiles without other errors, so I guess Imagine that he has to do with the path, and in my eclipse project, the tspClassName.java package resides in homework 4 is generated inside src, is there something wrong with that path that I use in the code?
Thanks
javac-squarepath.
/ Pre> I do not think what you want I think you need to change your java code, so it can be something like this:
javac-squarepath
Comments
Post a Comment