Ok now it feels like I've tried everything, can someone please tell me how I can compile a Java file ? My file/code looks like this:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
And I have saved it as HelloWorld.java
and in All Files. But the problem is that everytime I try to compile the Java file it says:
'javac' is not recognized as an internal or external command, operable program or batch file.
I have downloaded JDK
and JRE
, set/changed the path to C:\Program Files\Java\jre1.8.0_45\bin;
but when I look through the commands I can't see the javac
command anywhere!
I thought for a while that I may have downloaded the wrong JDK
, but when I see what's supposed to include in JDK
it says that javac is supposed to be there too - but I can't find it!
Any suggestion how to fix this ?
I use Windows 8.1
(I don't know if that helps but I write it just in case). I really need some help I've been trying to fix this for about 6 months now and it's getting really annoying not know what to do.