I have to make a game in Java for my computer science class. Since I have already wrote a game in Java in my spare time, I decided that I would reuse some of the code. However, after importing my old code I found that it only worked in debug mode. Running it normally would not make the program crash, but many of the in-game features were not working. I think I might have seen a class not found exception once when in debug mode, but it did not show up again. What could possibly be causing this problem? I have already tried re-importing the files. Feel free to ask for any additional information.
-
When you say "not working" what does actually happen?Telmo Marques– Telmo Marques2012-03-25 01:42:13 +00:00Commented Mar 25, 2012 at 1:42
-
1if the game crashes, can we get a stack trace?edthethird– edthethird2012-03-25 01:42:21 +00:00Commented Mar 25, 2012 at 1:42
-
By not working, I mean you can move the player, but none of the other units move. I can shoot, but my gun wont recharge. The game does not crash, so I have no idea what is going wrong.Franz Payer– Franz Payer2012-03-25 01:44:58 +00:00Commented Mar 25, 2012 at 1:44
Add a comment
|
2 Answers
For any non-standard class, remove the import statements. Then let the IDE make suggestions. Make sure the suggestions make sense.
When you say "debug mode", do you mean running under the debugger in the IDE, or do you mean when you have logging enabled, or when you insert 'System.out.println' statements?