JRE System Library is added by Eclipse IDE automatically on creating Java Projects. JRE System Library implements the Java API in Eclipse IDE. So all the predefined functions of Java, can be accessed by the Java Programs written in Eclipse IDE because of this JRE System Library.
Eclipse IDE adds the JRE System Library to the Java Projects on their creation automatically. Hence we can call the JRE System Library in the Eclipse IDE's Java Projects as Internal Library.
We can create programs in different programming language in Eclipse IDE. In case,when you want to create Python Programs in Eclipse IDE, you need to find the Library files of Python language and import them into Eclipse IDE before creating them. In this case, the Library files of Python Language can be called as External Library.
JRE System Library is displayed in the Java Projects in Eclipse IDE, but where is it exactly added to the Java Project. In order to find out, lets implement the following steps on Eclipse IDE -
1. Launch Eclipse IDE, Right Click on any Java Project and select 'Properties' option as shown below -
2. In 'Properties for Java Project' dialog, select 'Java Build Path' as shown below -
3. In 'Java Build Path' -> 'Libraries' tab, observe that 'JRE System Library' is displayed as shown below - (This is the place where Eclipse IDE adds JRE System Library to the Java Project, and all the Libraries added here will be displayed in the created Project in Eclipse IDE -> 'Package Explorer' )
What does this JRE System Library Contain ?
In order to find out lets expand the JRE System Library of any Java Project in Eclipse IDE as shown below -
What are .jar Files ?
JAR means Java ARchive.
So JAR files are fundamentally archive files, build on ZIP file format, typically used to collect many Java Class files and have the .jar file extension.
So in order to use the Classes of Java containing predefined functions, all the Classes of Java are grouped into .jar files. And all the .jar files of Java are collected in one library i.e. JRE System Library. When any Java Project in Eclipse IDE uses this JRE System Library, it will have access to all the predefined function of Java.
Understanding the JRE System Library using the following diagram -
Can we create and use our own .jar files ?
Yes, we can do that. How to create .jar files and use them will be explained in next post.
Please comment below to feedback or ask questions.
Creating .jar file using Eclipse IDE will be explained in the next post.
No comments:
Post a Comment