così dovrebbe andare
codice:
import java.io.*; 

public class InOut { 

 public static void main(String[] args) { 

  String riga = ""; 
  try {
    InputStreamReader ISR = new InputStreamReader(System.in); 
    BufferedReader BR = new BufferedReader(ISR); 
    riga = BR.readLine(); 
  }
  catch(IOException ioex) { 
    System.exit(0); 
  } 
  Email mail = new Email(riga);
 }
}
la classe Email e questa devono stare nella stessa directory