• Welcome to DictionaryForMids Forum.
 

Compiling

Started by TopDict, 27. September 2020, 22:56:11

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

TopDict

Hello!
I can`t compile the last version of DFM_empty (J2ME). There are not enough classes in the folder "dictionarymid-code-r787-trunk\JavaME" on https://sourceforge.net/p/dictionarymid/code/HEAD/tree/. Adding missing classes from folder "dictionarymid-code-r787-trunk\DictionaryForMIDs" I still can't compile them. Do you have a ready-made source assembly for DictionaryForMIDs_3.5.8_empty?
Thank you in advance!

Gert

Dear TopDict,

I am glad to know that you are interested in DictionaryForMIDs and compiling it.

Here some information: the JavaME part is the HMI (user interface) for Java ME devices. There is some overview on this concept at the diagram at http://dictionarymid.sourceforge.net/development.html.

For compiling, the classes from the translation layer are needed too.

http://dictionarymid.sourceforge.net/development.html#Source gives a description for building (compiling) the whole thing.

Does this help? Well just keep asking!

With best regards,
Gert

TopDict

#2
Thank you!
I have compiled jar file, but it doesn`t want to start. :'(

Gert

Could you provide some details please? For example, on which device did you install the jar file? Is there an error message?

Gert

TopDict

I will try to compile the jar file with build.xml. I will inform you about the results. Thanks!

TopDict

#5
All succeeded! I've already tested it. I'm delighted, thanks a lot!
I created my own dictionary for 20000 words. It works well in the jar archive, but when opened in the empty program from SDcard an error appears ""java.lang.OutOfMemoryError/null".
In jad file I wrote loglevel: 3 and the result is:
searchfile open:
....
indexfile open:
....
Instead of a phrase "read-parse file-line and dictionaryfile open" an error appears ""java.lang.OutOfMemoryError/null".
I reduced the dictionary to few words with short definitions, but the error remained. My cellphone is Samsung (2008).
What could be the problem?

Gert

I am glad to read that you made such good progress :) :)

QuoteI created my own dictionary for 20000 words.
If I may know, what dictionary is it? Maybe it is of public interest and something that you would like to release to the public?

QuoteIt works well in the jar archive
That's when you installed it on your Samsung device?

Quotebut when opened in the empty program from SDcard an error appears ""java.lang.OutOfMemoryError/null".
Also on your Samsung device? What is the difference to "It works well in the jar archive" before?

QuoteMy cellphone is Samsung (2008).
Could you please give some technical details (device, RAM).

With best regards,
Gert

TopDict

#7
Hello!
I took a part of one of the dictionaries from your site for testing, generated a dictionary with 20000 words (MyDict/dictionary/) and then created a jar/jad file.
Then I installed on my phone DictionaryForMIDs_empty.jad and chose in Dictionary path: file:///tflash/MyDict. There was an error "java.lang.OutOfMemoryError/null".
But then I chose in Dictionary path: file:///tflash//MyDict/DfM_Test_EngDef_3.5.9/DfM_Test_EngDef_3.5.9.jar and this error disappeared. Wonders never cease!
There is one problem left: when I enter "a" (incremental search and * character at end) I only get words starting with "a" (for example, apple) but not starting with "A" (Apollo).
Is the case-insensitive translate provided in version 3.5.9?

TopDict

I changed one line of code and the problem is solved. Sorry to bother you!

Gert

I am glad that you make progress.

Don't worry, you do not bother, in the contrary! Just that sometimes I am not able to reply right away.

About case insensitiveness, this is handled by the Normation classes, see here: http://dictionarymid.sourceforge.net/DfM-Creator/newdictNormationLang.html

Besides, previously I made a posting where I asked, for example, about your cell phone model.

With  best regards,
Gert

TopDict

#10
Sorry for the long absence!
My phone is Samsung E740. When reading a dictionary from a memory card the OutOfMemory error occures.  Attach screenshots.
Another question: my keys 1 (move selection forward) and 3 (move selection back) don't work. Should they work?

Gert

Those screenshots are enormously helpful:

  • At the beginning there is approx. 3 MB free memory
  • The number of free bytes slightly decreases after opening/reading/parsing searchfile and indexfile number 30
  • Opening and reading the directory file number 364 still works
  • Then there is a memory error when parsing the translation result of directory file number 364

Can you tell me the size of file directory364.csv?

In DictionaryForMIDs.properties, what is the value of dictionaryFileMaxSize?

Best regards,
Gert

TopDict

#12
Thanks!
The size of file directory364.csv is 6 432 bytes.
dictionaryFileMaxSize=71564

Gert

Thanks for that information; this looks good.

Are there also cases when the translation works, without OutOfMemoryError?

Gert

TopDict

I have tried to translate about 30 different words, unfortunately the result is the same (OutOfMemoryError).