Skip to content

File To Store Data in J2ME

I’m writing a J2ME dictionary app and I’m stuck on which is the best way to store the content in the app. I don’t want the app to be too big. I want to store the descriptions of the words in a dictionary. Please help me.

I know about RMS but I don’t want to use RMS because all the words in a dictionary and their descriptions cannot fit into an RMS.

I intend to work only offline, without accessing data from the web.



A dictionary is a map where the key is the word and the value is the description. You can have a Hashtable for it.
To store the values in you jar file use Java .properties file. Each line will kabe a key value pair.
Then you open that file with Class.getResourceAsStream and parse it.