how to get a specific object reference from VirtualMachine

Currently, I am working with making a automatic test application to test our business application This automatic test app should use JDI(java debug interface) to fulfil the purpose.

My question is how to get a specific object reference from the virtulmachine where I launch the business app. The reason is, for example, I want to click a button in business app or open a window etc to simulate the users behavior to the business app.

[462 byte] By [yinghui77] at [2007-9-26 11:24:42]
# 1

>My question is how to get a specific object reference ...

Not quite sure if this is what you are asking...

Are there one or many?

For the one - create a static method that returns the object.

For the many - create a hash table using a unique name and the object. Each time you create it add it to the hash. When done remove it. Create a static method that retrieves the object via the name.

jschell at 2007-7-2 0:34:40 > top of Java-index,Java HotSpot Virtual Machine,Specifications...