This is my own version of karel the Robot. The Janitor Robot that can only run un eclipse. My problem is when I open and i click run in a first time the robot moves according to the codes. but when i tried to edit the codes while the window is open, when i click the run button again it did not moves and need to close again.
This is my source code in the run method:
I have a janibot class that is implemented by a runnable and then. and i create its instance dynamically by this code.
Object tempJanibot = Class.forName(className).newInstance();
janibot = (Janibot) tempJanibot;
janibot.run()
where classname is the subclass of Janibot that is takingTurns in the screenshots.
It successfully created the instance of takingTurns class.
But I thought when i edit the code while the program is running and I click the run method the takingTurns class must be updated also but unfortunately it will not update and so I need to close again and click the run button.
