Is it possible to alter resource files under J2ME.

R

ranjan.niraj

Hi,
I am new to J2ME, and as such, to Java too.
Is it possible for an application to modify any of the files that
are passed into the device with the application jar file. Example
might be a resource text file used to store dictionary data, passed
into the mobile phone with the dictionary application.

Is it possible, in such a scenario, for the application to add an
entry to the dictionary database file on the mobile phone.

Any inputs would be highly appreciated.
Thanks,
-Niraj Ranjan
 
O

Oliver Wong

Hi,
I am new to J2ME, and as such, to Java too.
Is it possible for an application to modify any of the files that
are passed into the device with the application jar file. Example
might be a resource text file used to store dictionary data, passed
into the mobile phone with the dictionary application.

Is it possible, in such a scenario, for the application to add an
entry to the dictionary database file on the mobile phone.

Any inputs would be highly appreciated.
Thanks,

I'm not very familiar with J2ME, but my understanding is that you cannot
assume the existence of a file system, and so if you want persistence, you
need to use the record management store (RMS).

If you think that the end user might not make very many changes to the
provided resource file (which might be the case if you're making a spell
checker, and allowing the possibility for custom words), then one solution
might be to store the small deltas that the user DOES make to the RMS, and
when reading, first check the RMS for any overriding info, and if you can't
find anything, fall back on the bundled resource file.

- Oliver
 
R

ranjan.niraj

Thanks Oliver for the reply.

Resource files (accessible with the API getResourceAsStream, supported
under J2ME), passed with the jar file to the mobile device, can also
be used for persistent storage. This is a list of images, text etc
that the application uses internally. My question is, that is it
possible to modify these resources.

RMS is always an option.

-Niraj
 
D

Darryl L. Pierce

Hi,
I am new to J2ME, and as such, to Java too.
Is it possible for an application to modify any of the files that
are passed into the device with the application jar file. Example
might be a resource text file used to store dictionary data, passed
into the mobile phone with the dictionary application.

Is it possible, in such a scenario, for the application to add an
entry to the dictionary database file on the mobile phone.

No, it's not. Those files are in the MIDlet suite's JAR file and cannot be
modified once they're installed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top