0

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.

3
  • When you say "not working" what does actually happen? Commented Mar 25, 2012 at 1:42
  • 1
    if the game crashes, can we get a stack trace? Commented 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. Commented Mar 25, 2012 at 1:44

2 Answers 2

3
  1. For any non-standard class, remove the import statements. Then let the IDE make suggestions. Make sure the suggestions make sense.

  2. 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?

Sign up to request clarification or add additional context in comments.

Comments

0

Hard to say with this amount of info. Maybe you need to clean out the generated class files so that a clean build is made. If it's running on a server, maybe you need to delete and recreate it on the server.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.