• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDK and JRE installation  RSS feed

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have some doubts:

1. Is it necessary to have JDK and JRE installed in the same directory? Can I have JDK intstalled under C: and JRE under C:/Program Files?
2. Whenever I install JRE, it gets into the default directory which is "C:/Program Files/ Java". I would like to install it under C: directly. Is there a way to change the JRE installation directory?

Please suggest.
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. No.
2. Yes. you should be offered an installation location when you install Java. But there is a good reason for installing into Program Files rather than root of c:\, so as to keep all programs in the same location.
 
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shruti Sharma wrote:1. Is it necessary to have JDK and JRE installed in the same directory? Can I have JDK intstalled under C: and JRE under C:/Program Files?

Ignore Campbell. He never knows what he's talking about The answer is yes. I have my JDK installed under C:\Programming and the JRE in the default location within C:\Program Files.

Hmm wait. His "no" applied to the first question. My "yes" applied to the second question. The exact answer to both questions is "No. Yes." I guess Campbell is right after all

2. Whenever I install JRE, it gets into the default directory which is "C:/Program Files/ Java". I would like to install it under C: directly. Is there a way to change the JRE installation directory?

The installation of the JDK fires a separate installation for the JRE. Here you can change the path. But I agree with Campbell, don't install programs directly in C:\. On my system there are three main folders with installed programs:
- C:\Program Files for most of it
- C:\Programming for Ant, Eclipse, my JDKs, MinGW, Python, SharpDevelop. In other words, development tools
- G:\ for games

Since my G:\ is dedicated for games it's not that bad to install games in the root, but unless you too have a dedicated drive (which C:\ never is) don't install programs in the root of any drive.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote: . . . I guess Campbell is right after all
He usually is


I can see what the confusion was; there were two questions under no 1 and I only answered the first question. Sorry.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!