Steps to make the .jar file
Step 1: - prepare the .class file by the javac these are the .class file that we want to move in the .jar file.
C:\java>javac abc.java
.class will be generated.
Step 2: -Execute the jar command
Step 3: - After creating the sample.jar file just place it in the jre\lib\ext folder.
Step 4: - Delete the .class file from the current directory
That contains main method
Step 6: - System class loader becomes fail to load Test.class but extended class loader will load successfully from
C:\Program Files\java\jdk1.8.0\jre\bin\ext\sample.jar
No comments:
Post a Comment