Difference between public JRE and private JRE ? | Java ELearn | @StudyEcart

 There are two types of JRTEs will be created once we install JDK software. Default private JRE will invoke at the time of compilation and public JRE will invoke at the time of execution.


In the initial version of java ,these two JREs will be invoked separately but now in the current version of java ,if one JRE is not there then another JRE will be invoked. The major difference of private and public JRE as follows,


1.Already developed Java application needs to run in the file system then only public JRE is required to provided ,the environment to run that application .Here private JRE cannot be used to run these type of application.


2.If we develop the source code, we need to compile and execute then either private or public JRE can be used to run application.


3.Compilation is higher version JDK, execute in lower version is not possible but vice versa is possible.


4.we can install any or all version of JDKs. We can take any name un class name and save but at the execution time ,we must use the  .class file name only.


we can compile 

               . java (empty java file compilations )

            *.java (all java files compilations)


5.We can Compile multiple Java files at a time but execution is not possible.


Post a Comment

0 Comments