import java.io.*;
import javax.swing.*;
import javax.tools.*;
import java.util.*;

class derle
 {
 public static void main(String args[] )
 { JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
 String program_ismi="";
 if(args.length==0)
 {
 program_ismi=JOptionPane.showInputDialog( "derlenecek programın ismi:")+".java";
 }
 else
 {program_ismi=args[0]+".java";}
  int rc = javac.run(null, null, null,program_ismi); 
 System.out.println("javac "+program_ismi);
 }
 }
