Compile failed; see the compiler error output for details error. Please help solve it !!!
Public class copyofcompliertoclass2 {
Public Boolean sourceconvertclass (){
Boolean flag = false;
File F = new file ("D:/Generator-output/hibernate/code /");
// Find all objects
File [] files = f. listfiles ();
Javac compiler = new javac ();
File destfile = NULL;
For (File file: Files ){
// Find the file without. Java
If (file. getname (). Contains (". Java ")){
Compiler. setproject (new project ());
// Path of the compiled. Class File
Destfile = new file ("D:/Generator-output/hibernate/code /");
Destfile. mkdirs ();
// Directory of the source file to be compiled
Path srcpath = New Path (compiler. getproject (),
"D:/Generator-output/hibernate/code /");
Compiler. setfork (true );
Compiler. setsrcdir (srcpath );
Compiler. setdestdir (destfile );
Try {
Compiler.exe cute ();
Flag = true;
} Catch (buildexception e ){
// System. Out. println ("An error occurred while compiling the. Class file ");
}
}
}
Return flag;
}
Public static void main (string [] ARGs ){
Copyofcompliertoclass2 CCT = new copyofcompliertoclass2 ();
System. Out. println (CCT. sourceconvertclass ());
}
}