hai ragione,
il tutto dipendeva da quello

ho risolto cosi:

codice:
public void gofinder() throws SQLException{
   
  
       String sql1 = "select file from watch order by file";
        pst1 = conn.prepareStatement(sql1);
        rs1 = pst1.executeQuery(sql1);
      
    while(rs1.next()){
        String name = rs1.getString("file");
         System.out.println(name);
         System.out.println(pst1);


        String sql2 = "select file from irc where file like '%" + name + "%'";
        pst2 = conn.prepareStatement(sql2);
        //pst2.setString(1,"%" + name + "%");
        rs2 = pst2.executeQuery(sql2);
        while(rs2.next()){
            // get the participants
            String name2 = rs2.getString("file");
            System.out.println(name2);// controlla query
            System.out.println(pst2);// controlla query
           
        }
    
    
    }

grazie!