• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDK Private JRE vs Public JRE

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure where else to post this one. I'm currently working with Java6 in a Windows XP (awful by the way) env. When you install the JDK, you have an option to install the public JRE. Now from what I gather, a private JRE is installed within the JDK dir by default and this is the JRE that the java tools such as 'javac' use. I would normally set up JAVA_HOME variable to point to JDK installation, C:\Program Files\Java\jdk1.6.0_12, but I have other applications that use the JAVA_HOME var to run java apps. Should I also install the public JRE? And are these apps going to use the public JRE, or will they use the private JRE because of how JAVA_HOME is defined? I am a little confused by the whole public vs private JRE thing. Any help would be greatly appreciated. Thanks.
 
Ranch Hand
Posts: 97
Python VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I myself wasn't even aware there was a public or private JRE, but a quick google search turns up this. He does a pretty good job of explaining the differences, basically the public JRE is the one you want everything else on the computer to use, and a private JRE is just if you need to have multiple versions of the JRE on the computer.
 
J Solomon
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

colton peterson wrote:I myself wasn't even aware there was a public or private JRE, but a quick google search turns up this. He does a pretty good job of explaining the differences, basically the public JRE is the one you want everything else on the computer to use, and a private JRE is just if you need to have multiple versions of the JRE on the computer.



So I read that post and understand what the writer was trying to convey. My issue is, if you install the JDK and set your JAVA_HOME variable to point to your JDK install path, then whenever you issue any command such as "java ....", then anything that uses JAVA_HOME is going to source the version of java that lives in the JDK path (the private one)? After a a little tinkering, I've noticed that if you install the public JRE as well, it looks like Windows does some fundangled thing and sets the JRE's path somewhere in the registry or what not so that the public JRE is sourced before we hit JAVA_HOME in the path.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic