Well i tried to start with react native when suddenly i got an error that java compiler couldn't be found. So i searched and find something about java_home which i fixed but still the compiler isnt found. After testing in the cmd prompt javac -version couldn't it recognise any javac. Then i looked in the bin folder in java jre and realised that the javac doesnt even exist. Is this some kind of bug or should i reinstall it or something.
Asked
Active
Viewed 1,028 times
0
-
sorry the image was uploaded wrong but its in that link – Tobbin2 Jan 05 '19 at 19:33
-
You need to install JDK – inquisitive Jan 05 '19 at 19:34
-
i think JDK is installed aswell, the folder is right under the JRE folder, C:\Program Files\Java\jdk-10.0.2 – Tobbin2 Jan 05 '19 at 19:55
-
tried installing the jdk package but cmd can still not find javac – Tobbin2 Jan 05 '19 at 20:08
2 Answers
0
Try installing jdk
as jre
is for executing already compiled code. But for a whole new compilation you require a jdk that is development tools of java development toolkit. As javac.exe
is a part of jdk not jre.

Himanshu
- 3,830
- 2
- 10
- 29
-
-
-
ok i just tried reinstall the whole java, it uninstalled the old ones and installed the new. C:\Program Files\Java\jre1.8.0_191 exist but javac still doesn't exist – Tobbin2 Jan 05 '19 at 19:49
-
-
i think i already has jdk, the jdk folder is under the jre C:\Program Files\Java\jdk-10.0.2 – Tobbin2 Jan 05 '19 at 20:02
0
The image shows a JRE. javac is java compiler, if it's required you need to install JDK.

high-voltage
- 143
- 5
-
i have jdk folder under the JRE and it has javac in the bin folder there, should i re locate it to the jre/bin folder? – Tobbin2 Jan 05 '19 at 19:53
-
-
use cmd first `cd \filepath..` to your java file then `set path =..jdk\bin ` then `javac filename.java ` – Himanshu Jan 05 '19 at 20:07
-
wait so you mean ..jdk\bin\javac filename.java? sorry its first time im around on these parts – Tobbin2 Jan 05 '19 at 21:44