Data in J2ME RecordStore does not persist across sessions

前端 未结 7 658
渐次进展
渐次进展 2021-01-06 21:50

I\'m building a mobile app with J2ME, and I\'ve found that the data I write into a RecordStore can be accessed while the program is still running but it is lost after quitti

7条回答
  •  醉话见心
    2021-01-06 22:19

    I experienced the same problem myself, I did however discover that NetBeans, or whatever, deletes the deployed program files after execution. These files are located in the C:\Documents and Settings\MyUser\javame-sdk\3.0\work\0\appdb folder, might be different on Vista/Win7 and I guess the number in the path refers to the emulator you are currently using. Anyways, in this folder look for something that is named like your RecordStore. E.g. "00000002_PSC_onfig.db", which is my suite configuration recordstore named PSConfig. By copying this to e.g. "Copy of 00000002_PSC_onfig.db" it will not be deleted. After NetBeans have cleaned up, just copy it back to its original name. The next time you hit run in NetBeans your recordstore will be there. It's pain, but at least it gives you the possibility to use the emulator to debug your RMS handling.

提交回复
热议问题