Solve $BAB^{-1}=J$ for matrix $B$ I have 3 Matrices : $A , B$ and $J.$ I know matrices $A$ and $J. J$ is the real jordan normal form of $A.$ The relationship between the three matrices is given by $BAB^{-1} =J.$ 
How can I find the matrix $B.$
For example,
$A= \begin{bmatrix} 0 & 1 & 0 \\
     0 & 0 & 1 \\
     1 &-1 & 1 \end{bmatrix}$
$J= \begin{bmatrix} 0 & -1 & 0 \\
    1  & 0 & 0 \\
    0  & 0 & 1 \end{bmatrix}$
$BAB^{-1}=J$ can be written as $BA-JB=0$. That's as far as I got.
Thanks for your help.
 A: $BA - JB = 0$ can be considered as a $9 \times 9$ system of linear equations in the entries of $B$.  Solve that system.
A: The columns of the transform matrix $B$ are the real and imaginary parts of the eigenvector corresponding to the eigenvalue $\pm i$ (that's the first two columns!) then the eigenvector corresponding to the final eigenvalue of 1.
Calculate these to show that $B=
\begin{bmatrix}
1 && 0 && 1 \\
0 && -1 && 1 \\
-1 && 0 && 1 \\
\end{bmatrix}
$
A: $\det(A-\lambda I) = 0$
$-(\lambda-1)(\lambda+i)(\lambda-i)$
Complex eigenvalues 
Here is a little trick
$(B^{-1} A B)^2 = J^2\\
B^{-1} A^2 B = J^2$
And $A^2$ has real eigenvalues and the same matrices $B, B^{-1}$
$A^2 = \begin{bmatrix} 0&0&1\\1&-1&1\\1&0&1\end{bmatrix}$
and $J^2 = \begin{bmatrix}-1&0&0\\0&-1&0\\0&0&1\end{bmatrix}$
And we know that $-1,-1,1$ will be the eigenvalues of $A^2.$  Find the associated vectors.
$A^2 \begin{bmatrix}-1&0&1\\0&1&1\\1&0&1\end{bmatrix} = \begin{bmatrix}-1&0&1\\0&1&1\\1&0&1\end{bmatrix} J^2$
$B  = \begin{bmatrix}-1&0&1\\0&1&1\\1&0&1\end{bmatrix}$
And I will leave it to you to find $B^{-1}$
