开发者

Java: updated class files not used

开发者 https://www.devze.com 2023-01-23 02:19 出处:网络
I\'m developing a Java program through Eclipse locally, and debugging on a remote machine. Whenever I make a change to my program, I copy the corresponding class file to the bin directory on the remot

I'm developing a Java program through Eclipse locally, and debugging on a remote machine. Whenever I make a change to my program, I copy the corresponding class file to the bin directory on the remote machine. I run my program (a simulator) through a python script via the OS.system command.

The problem is that my program sometimes does not 开发者_StackOverflow中文版use the updated class files after they have been moved over.

The problem persists even if I log out and back into the remote machine. What's really strange is that, as a test, I deleted the bin directory entirely on the remote machine, and was still able to run my program.

Can anyone explain this?


I would bet dollars for donuts that under some conditions you are not restarting the JVM between tests.

The other obvious thought is that the class is not being copied to the target system as expected, or not to the correct location. Or, of course, the program is not being run from where you expect (i.e. there is another copy of the class files, perhaps in a JAR, which is actually be run).

Explicitly recheck all your assumptions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号