By clipping them in 3D if one lies behind the plane (if both are behind, the line is hidden anyway). That's quite simple, but i suggest to clip them against plane+small-value to avoid rounding errors. Here's some code to get you started:
SimpleVector start=new SimpleVector(10,10,10);
SimpleVector end=new SimpleVector(30,30,-10);
float planeAt=1.01f;
SimpleVector dir=end.calcSub(start);
float mul=(planeAt-start.z)/dir.z;
float x=start.x+mul*dir.x;
float y=start.y+mul*dir.y;
SimpleVector intersect=new SimpleVector(x,y,planeAt);