01-02-2009 10:50 PM
Hi- My application needs to store 3 large static strings (4, 6, and 36KB in size). The app searches for a match on text in each of these strings once each time it is run.
I have seen some obscure examples on resource files online and in the developer guide, but I'm wondering if someone can give me a simple example. I'm not looking for an i18n example... I just want to store 3 long strings and access them from my program.
Specifically, I need to know how to get them into the IDE and compile them into my program, and then also how to access them in my program. I'm using JDE 4.7.0.
Any help will be much appreciated! Thanks,
Solved! Go to Solution.
01-03-2009 08:07 AM - edited 01-03-2009 08:09 AM
Taking this question more literally("I need to know how to get them into the IDE and compile them into my program") , and I think it is reasonable to do so, he is looking for a code generator.
I normally use cygwin bash scripts for stuff like this calling mostly grep, awk, and sed. If you just want to extract strings, depending on the source of your strings, you can usually find some way to put them on the clipboard (/dev/clipboard in cygwin) and paste them into your editor screen.
If you are going to include a file in your jar it may be reasonable to consider generated code instead.
For your strings it may not matter much but someone else was asking about Mbyte strings. Presumably you
could also use PERL or your own c++ code to index the strings to facilitate searching or whatever you plan on
doing ( at least sort them for later binary search etc).