This is not a Servlet question so I'll move it to the Java in General (beginner) forum. You'll be sure to get a quick reply there.
Dave
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35224
7
posted
0
I'll bite and supply the quick answer David was talking about
You can't. Java hides the details of in-memory representation, and particularly has no concept of accessing data structures in memory by address. Given that, the previous poster was right to ask: what do you need the info for?
How can I find the address of primitive data type in java.
Short answer: You can't. If it's local, it's on the stack. If it's a member of an object, it's on the heap. Either way, there's no way in Java to get at that information; Java doesn't allow it by design.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.