do i have to kill my simulator before i want to see the latest code changes on the sim? or is there a way of getting the BB simulator to pick up the latest code changes without having to exit the current instance and starting the simulator again.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There seem to be no way to change the executable while the simulator is running, since jar file are loaded in memory.
So yes you need to kill the simulator everytime you change the code.
Edit : With the version 1.1 of the eclipse plugin you can now to hot swap code on the simulator.
回答2:
I do a file->Load Java Program
, file->Reset
every compile to avoid exiting the simulator. A real device will have to reboot as well.
edit 02/28/10
from The BlackBerry Developer
After experimenting quite a bit, and posting a few questions, Mark Sohm from RIM (BlackBerry Developer Journal) has filled us in on the conditions that an application update forces a restart:
- The application is running or the library is in use.
- The application has any open resources (ie: a library could be holding onto something).
- The application has an active listener registered with the system.
- The application has added menu items to any BlackBerry applications.
- It is an auto start application.
- The application is listening for incoming IO connections (this would also fall under the "application is running" reason).
- The application makes use of persistent storage and/or backup/restore features.