JVM structure | Sololearn: Learn to code for FREE!

+6

JVM structure

What exactly is a symbolic reference? How is it resolved at the time of linking just after class loading is completed? Explanation would be nice or you can share a link that explain this well.

1/13/2020 5:45:00 AM

Avinesh

9 Answers

New Answer

+5

Symbols are tokens in your program. Tokens are variables, and literals in your code. They are generated during the parsing stage of the code. The parser can be multi-pass or single-pass. The parser produces the list of tokens, each token is assigned a unique memory address. At runtime, there is only a loading of symbols in the memory. All references are resolved before that (compilation state) that is why there is a compilation error if a variable is used without defining it first.

+5

Avinesh The 3rd paragraph under the dynamic linking section should explain this quite well. https://blog.jamesdbloom.com/JVMInternals.html#dynamic_linking

+4

David Carroll sir thanks, that does explain it in simple words.

+3

~ swim ~ But that was quite a nice explanation πŸ‘ I was just trying to understand the JVM structure and the very first part is class loader subsystem which has linking process that involves symbolic reference and runtime constant pool and other stuffs which are hard to understand in one look. It's just been a couple of hours that I have started reading it in depth so probably I should not be worried right now because I hope that it will sink in with time.

+3

β˜•NavyaπŸ’Ž Thank you but I have already gone through similar websites. And ~ swim ~ I think this is what I am actually looking for. https://docs.oracle.com/javase/specs/jvms/se7/html/

+2

Thanks ~ swim ~ that makes sense to me now. Probably need a lot of reading on this topic.

+2

https://www.javatpoint.com/internal-details-of-jvm

+1

Avinesh πŸ‘πŸ™β˜Ί Just to add operators and keywords are also converted to tokens as well as class methods. This is simplest of explanation, there is probably much more to that i don't know πŸ˜‰

+1

Yes it will surely sink in, take your time to understand each topic