Question

For my masterthesis I'm writing an Eclipse plugin for visualizing variables while debugging. I put a lot of effort in creating custom 'crawlers' for a comfortable access to the IJavaObject, IJavaType and IJavaValue and more. The problem is, that I haven't seen any possibility to get the real underlying object in memory but just the IJavaObject wrappers.

E.g. if I have a java.awt.Color I can get the IJavaObject and call methods with my crawler (so via the clumsy sendMessage of JDT). Therefore I am able to query for the single R, G and B values, built my own Color object and can directly show the color. But when it comes to an java.awt.Image I want to directly draw somewhere, for example, I can't do this. I have access to the IJavaObject and my crawler and can call some methods (btw only those that accept primitive types as parameters) and even query private fields, but I need the real Image object not just it's width, height or ImageObservers.

So in short: Is there ANY possibility to access the real underlying object of a IJavaObject?

Thanks in advance.

Was it helpful?

Solution

The real object is in a different JVM from the debug code which means there is no way to access it.

In the worst case the object may contain references to native objects (perhaps a graphics handle) these only make sense in the JVM the object is running in.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top