The border of camera

we created a wall. but the camera is passing through the wall. i dont want that how can i fix?

Use some kind of collision detection. Either capture the camera inside a bounding volume (fast). Or check it's if it's colliding with the scene (slower).

i created an object in 3d max then i put this object  (0,0,0) of the coordinate in jME. but i want that my camera will hit my object and then it will stop. how can i do that.