File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes JVM loading concept Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "JVM loading concept" Watch "JVM loading concept" New topic
Author

JVM loading concept

vardhan reddy
Ranch Hand

Joined: Oct 28, 2011
Posts: 42
Hi All,

How JVM will find is loading file is class or interface. How it will find extended/implemented files.

Thanks.
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1295

vardhan reddy wrote:Hi All,

How JVM will find is loading file is class or interface. How it will find extended/implemented files.

Thanks.

Well, I'm not sure if I understand your question correctly, but this is what I think:
1) When we write a class or interface, we clearly mention in code that whether it is a class or interface right? So, I don't think JVM should face any issues while identifying if it is class or interface.
2) JVM couples classpath and package hierarchy (i.e. import and package statements) to search classes.


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD)
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 5893
    
    6

vardhan reddy wrote:Hi All,

How JVM will find is loading file is class or interface.


By searching in the classpath.

How it will find extended/implemented files.


It's not clear what you're asking here. If you're asking, given a particular class or interface, how does the JVM find all its subclasses or subinterfaces, the answer is that it doesn't. If B extends A, the JVM doesn't know that until it loads B when our code first uses it. It doesn't find B when it loads A.
 
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.
 
subject: JVM loading concept
 
Similar Threads
what are ClassLoaders?
I propose rename "Performance" to "JVM/Performance"
Class loading
how and when to set System.SecurityManager()?
applet security error online