Search code examples
compilationjava.class-filejavap

How javap works for java library files?


JRE contains the .class files for library classes.

When these .class files in JRE folder will be used?

Does JRE contains the .class files for all library classes.

Let us take an example..

when we are importing the library files, we are using the definition of the class file from the src.zip and not the .class file. E.g. import java.net.InetAddress. that is just we are inheriting the library class.Therefore the code of the library class too complies along with our code na..

we are not using the .class file directly. so what is the use of having .class files for those library files in JRE folder?

I searched JRE folder, but I found no .class file for InetAddress

But command javap java.net.InetAddress still works well.

Someone please help.

Thanks in Advance.


Solution

  • Yes the JRE contains the class files.