Tuesday, March 15, 2011

j2mewtk - adding files to DefaultColorPhone temp settings.

I am using Netbeans and j2mewtk to develop and test mobile applications. If I want to do file IO on an image the emulator uses ...\j2mewtk\2.5.2\appdb\temp.DefaultColorPhone[####]\filesystem\root1 to store files for the current, temporary emulation.

If I want to operate on a pre-existing image I have to start the emulator, check which temp environment it is using (in Netbeans output window), then navigate to that directory and drop the image in, then continue running to mobile app

. It should be pretty simple to just have the emulator or netbeans start the temp directory with the image pre-existing. I've tried using the initial DefaultColorPhone, hoping that every temp instance would draw from it, but I have had no luck. I just can't figure out how to do it. Thanks!

From stackoverflow
  • I've looked off and on for the last month for an answer to this. Can believe within a few minutes of posting, I found something on the Sun Forums. Basically, the emulator will use the DefaultColorPhone as the initial directory. But when it is in use a file 'in.use' is created and resides in the directory. If the in.use is not removed (it should be when the emulator closes) then then next run creates a temp file dynamically. So, if you have this problem, just clean out the DefaultColorPhone directory and everything should be good.

  • swish is right. Cleaning up the direcotry should help. The workdir is created as a copy of the currently in use work dir so dropping the files there should also help.

0 comments:

Post a Comment