This is what I have till now. A friend of mine helped, but now I dont know what to do anymore or how to show that the two straights are actually cutting each other as the math shows.
class matrix
{
public static void main()
{
//Initialisierung von 4 Vektoren
double[] s1 = new double[3] ;
double[] s2 ;
double[] r1 ;
double[] r2 ;
//Eingabe der Vektoren
// "Bitte Vektoren eingeben"
System.out.println("text") ;
s1[0] = system.in.read();
s1[1] = get();
s1[2] = get();
s2[0] = get();
s2[1] = get();
s2[2] = get();
r1[0] = get();
r1[1] = get();
r1[2] = get();
r2[0] = get();
r2[1] = get();
r2[2] = get();
double[][]m = new double [3][3];
m[0][0] = r1[0];
m[0][1] = r1[1];
m[0][2] = r1[0];
m[1][0] = -r2[0];
m[1][1] = -r2[1];
m[1][2] = -r2[2];
m[2][0] = s2[0]-s1[0];
m[2][1] = s2[1]-s1[1];
m[2][2] = s2[2]-s1[2];
m[0][1] = m[0][1]-(m[0][0]*m[1][2]/m[0][2]);
}
}