We investigate theoretically the Josephson junction of semiconductor nanowire with strong spin-orbit (SO) interaction in the presence of magnetic field. By using a tight-binding model, the energy levels \(E_n\) of Andreev bound states are numerically calculated as a function of phase difference \(\varphi\) between two superconductors in the case of short junctions. The DC Josephson current is evaluated from the Andreev levels. In the absence of SO interaction, a \(0\)-\(\pi\) transition due to the magnetic field is clearly observed. In the presence of SO interaction, the coexistence of SO interaction and Zeeman effect results in \(E_n (-\varphi) \ne E_n (\varphi)\), where the anomalous Josephson current flows even at \(\varphi =0\). In addition, the direction-dependence of critical current is observed, in accordance with experimental results.