public static void main(String[] args) {
		String fullQuanlifiedFileName ="D:\\MyEclipseGen.java"; 
	       // "src/com/xin/A.java";   		     
	JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
	try {
		FileOutputStream err = new FileOutputStream("D:\\err.txt");		
		int compilationResult = compiler.run(null, null, err, fullQuanlifiedFileName);	
		if(compilationResult == 0){
			 System.out.println("Done");
			} else {
			 System.out.println("Fail");
			}
	} catch (Exception e) {
		// TODO: handle exception
	}
	
		
  }