The judge in Bill Cosby's criminal case expects the trial to last about two weeks and hopes to have a jury in place before the proceeding opens June 5 in Montgomery County.