JavaFX 2.2 3D support is rather rudimentary. You can create 2D shapes, then apply transforms to them to get them into 3D space, but you are not directly defining the shapes in 3D coordinate. So to get a 3D line you can define 2D line, then rotate it around the x and y axes and set a z coordinate on the node.
Future JavaFX versions will provide 3D specific shapes and meshes so that use of 3D features is more natural. For instance you could use a thin cylinder to represent a 3D line.