What is the reason behind putting two jre, one in jdk and one outsite jdk in the java folder in Program files

后端 未结 4 1692
灰色年华
灰色年华 2021-01-12 08:20

I have see two jre in the java folder one in jdk and one outside jdk. Can you tell me the what is the reason behind having these two jre?

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 08:50

    If you are developing a java program then compile time private jre(C:\Program Files\Java\jdk1.7.0_65\jre) will be used and running time public jre(C:\Program Files\Java\jre7) will be used.This is the default use case scenario.If compile time jvm finds that private jre is not there then it will go for public jre and run time also if jvm finds that if public jre is not there then it will go for private jre.

提交回复
热议问题