First off, you might be running into threading issues, but even if you rule them out, your code is not going to work.
Upon the click of the button, you would draw a circle in the window
ONCE only. Your main loop will immediately clear and redraw the whole window, however, so the circle is gone.
You commented out this line:
//if (shape!=null) rw.draw(shape);
This would be the correct way to approach the issue, save the shape in a member variable and use that in your main loop. Make sure that you synchroninze any modification of that variable, because you
are dealing with multiple threads (please read up on Swing / AWT event handling and the AWT thread, I can't offer support for that here).
How to compile project using command line?
Nothing special here, just make sure jsfml.jar is in the classpath.