1

I am try to set java virtual machine path in eclipse and tomcat, and find out there is "javaw.exe" in both the JDK and JRE directories.

Which "javaw.exe" should be used, and why?

user1056648
  • 193
  • 1
  • 1
  • 7

2 Answers2

0

You shouldn't be using javaw as it is java without a console. Using the java in JDK is probably the safest. JRE is only the runtime and it will also work. But when developing I recommend JDK because that's also where javac.

Amir Raminfar
  • 33,777
  • 7
  • 93
  • 123
  • he didn't ask for difference between `java` and `javaw`, he was looking for difference between two `javaw` executables – Oleg Mikheev Dec 04 '11 at 22:29
0

These javaw executables are identical. You can see it yourself - compare their sizes.

As this link says

JDK includes the JRE plus command-line development tools

So whenever you are doing some development-related stuff you should use the one from JDK.

PS:

as Amir mentioned earlier - you probably don't want to use javaw at all...

Oleg Mikheev
  • 17,186
  • 14
  • 73
  • 95