JVM, JRE & JDK
v Format of class file.
v Class loading mechanism.
v Memory Management etc.
JVM
JDK
·
In Java,
classes are packaged and distributed in jar format.
Jar - Java Archive
·
Sun
Microsystems provides classes of core java library through a jar file named
“rt.jar.
·
C:\NewJava>jar
jar -tf rt.jar
jar -tf rt.jar> a.txt
To compress
jar -crf a.jar *
jar -tf a.jar (to see)
jar -xf a.jar (to extract)
The above program in modified form
PROGRAM first2.java
public class First2
{
public static void main()
{
System.out.println("It is overloaded main.....");
}
public static void main(String args[])
{
System.out.println("Invoked by JRE, invoking overloaded main......");
main();
}
}
OUTPUT –
No comments:
Post a Comment