code: public void run(File input_file, File model_file, double c, int mem, double[] weight) throws IOException
  	{
  		input_file_name = input_file.getAbsolutePath();
  		model_file_name = model_file.getAbsolutePath();
  
  		//System.out.println("input_file_name: " + input_file_name);
  		//System.out.println("model_file_name: " + model_file_name);
  		//System.out.println("mem: " + mem);
  
  		set_param(c, mem, weight);
  		read_problem();
  		error_msg = svm.svm_check_parameter(prob,param);
  
  		if(error_msg != null)
  		{
  			System.err.print("Error: "+error_msg+"\n");
  			System.exit(1);
  		}
  
  		if(cross_validation != 0)
  		{
  			//do_cross_validation();
  		}
  		else
  		{
  			model = svm.svm_train(prob,param);
  			svm.svm_save_model(model_file_name, model);
  		}
  	}
docs: my code