int i = Integer.parseInt(String s) ;
if (i <= 0) {
   System.err.println("非正整数!");
}