Thanks Pavel!! It worked.
On Wed, Apr 30, 2008 at 7:47 AM, Pavel Pervov <[EMAIL PROTECTED]> wrote: > Megha, > > Please, look into string_set_fields_separate (in > vm/vmcore/src/util/vm_strings.cpp:207): there you'll find setting > j/l/String object fields. You can add setting your additional field > there. > > WBR, > Pavel. > On 4/29/08, Megha Chauhan <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am trying to modify the String Class and have added one more field > which > > keeps a copy of the value field. > > I have added this field to all the constructors and it works fine when > > creating an object with 'new' keyword. > > I am having trouble getting this to work with constant strings. I have > tried > > to add this to vm_strings.cpp init_fields() method. > > I have also tried to initialize the field in VM.intern() after the > string is > > returned from internmap.intern() but in this case the VM is not able to > load > > and crashes. > > Can someone tell me what needs to be done to add a new field to > String.java > > and make constant strings have that field? > > Thanks > > Megha > > > > > -- > Pavel Pervov, > Intel Enterprise Solutions Software Division >
