|
The only problem I found was that the sources didn't compile right away, because readLine is supposed to return string, while yours didn't return anything. I just change the line to "return str;" and it compiled without problem.
I then run the main class and it worked without problems. Most probably you have some bug in one of your other OS classes. The best way to test them one by one, while using the provided OS classes for support. For example, create a new directory, put your compiled Keyboard.vm class and the test KeyboardTest/Main.vm class and run it. This way the other OS classes will be the one provided with the project. Repeat this for all classes until you make sure they are working fine.
Another thing to try is to use the directory where you can reproduce the problem. Start by moving one OS .vm out of it and test it to see if you still get the exception. If you do, return the .vm file and move the next one. Repeat until you pinned the bad class.
Use the breakpoint and stepping facilities of the VMEmulator to try to find the problem.
P.S. After you're done, please remove your sources from the post.
|