Disclosure: I am new to Java
I need to access a field in an object from a third party package. I have found the object in a heap dump, but I am unable to locate a name for the object that can be externally referenced. If I do a OQL query in the heap dump for “select x from classname x”, the result I get is classname#1. Unfortunately field.get does not like classname#1 as a argument, netbeans gives me a illegal character \35 error.
Any tips on how to get an object name for this instance that field.get will accept?
edit: this is an extension app for a 3rd party program. the app needs to pull info from the 3rd party program while it is running.
edit2: here is a screenshot of the heapdump, I need to know how to get an object name for what the green arrow is pointing to.
Without knowing exactly what you’re trying to do, I’m guessing that a Java IDE such as Eclipse will better provide you with what you’re looking for than OQL.
Is your need limited to working within OQL – or are you just trying to use OQL to find the details for use within future development?
If the later, if you’re trying to reference classes / methods / variables in the other code, I’m assuming you have a JAR or *.class files of the other code you’re trying to interface with. If you add this other code (even in it’s bytecode format, without the original sources) as references to your project, most IDEs (including Eclipse) will show you a nice outline of all of the available classes, methods, and instance variables – assuming there was no obfuscation used.