I had installed Java few months back. However there was an issue with Eclipse which was not getting resolved ,hence I deleted all eclipse related files and folders and reinstalled Eclipse. Now under the program files I see a folder named Java under which there is a Jre folder and no jdk folder.java -version is a success but javac -version is not. however still java programs are running. My understanding is that when java is installed a jdk folder is created under the java folder. How does having or not having jdk affect running java?
Asked
Active
Viewed 498 times
0
-
You didn't install a JDK? You installed the JDK to an alternate location? The Java installer always creates a JRE under Program Files but you can install the JDK elsewhere, and that's what Eclipse needs. – Jim Garrison Mar 05 '16 at 19:51
-
JRE allows you to run compiled java classes, but the JDK is required to compile them. – fabian Mar 05 '16 at 19:52
-
1Eclipse uses it's own compiler, however I would recommend installing the jdk so can compile Java programs from terminal (And don't have to open eclipse every time you want to write a small class). – Majora320 Mar 05 '16 at 19:52
-
find programfile86 too. if java folder is still not in that it means you have installed a `jre` not `jdk`. bcoz `java` command is a part of `jre` and `javac` is part of `jdk` – Vikrant Kashyap Mar 05 '16 at 19:53
-
[The eclipse compiler](http://blog.deepakazad.com/2010/05/ecj-eclipse-java-compiler.html) – Majora320 Mar 05 '16 at 19:54
-
I don't remember what I installed initially. But from your comments what I understand is jre is enough if i am using eclipse because eclipse has its own compiler. Is the same case for environment variables as well. Meaning that I don't have to set environment variables if I am using eclipse with jre. Is that a correct understanding. – starhunter Mar 05 '16 at 20:20