1

If eclipse has a compiler (see Wikipedia article on IDEs, third line), itself why do I have to download the jdk for compiling .java files? Doesn't eclipse convert my file to bytecode?

sepp2k
  • 363,768
  • 54
  • 674
  • 675
prabesh013
  • 15
  • 2
  • You might want to read [what a compiler is](https://en.wikipedia.org/wiki/Compiler) – Naman Oct 12 '17 at 04:22
  • Possible duplicate of [What is the difference between javac and the Eclipse compiler?](https://stackoverflow.com/questions/3061654/what-is-the-difference-between-javac-and-the-eclipse-compiler) –  Oct 12 '17 at 11:37

1 Answers1

3

Eclipse has its own compiler and it can work with JRE only. JRE is needed because Eclipse itself is run with java. However if we have JDK installed we can see Java platform class sources during develepment. Also Eclipse's Maven plugin uses JDK compiler.

Evgeniy Dorofeev
  • 133,369
  • 30
  • 199
  • 275
  • The JRE is also needed to actually run the compiled program. So you'd need it even if Eclipse weren't written in Java (unless Eclipse also implemented its own JVM and Java standard library, which it doesn't). – sepp2k Oct 12 '17 at 12:29