I am using MobaXterm, a friendly Unix terminal that runs on Windows. I want to compile a simple Java program using the javac command. After looking at plenty of other forums, I know I need to use the path where Java is installed, but no matter what I try, I keep getting the error
javac command not found
on the terminal. Can someone please help me out with compiling basic Java programs from within their directory on a Unix terminal on Windows?
And yes, I have JDK for Windows installed on my computer, I just don't know how to use it when compiling through the terminal.
PATHinclude wherejavacis?export PATH=$PATH:/drives/c/Applications/Java/jdk1.7.0_45/binand thenjavac(Note that a path on the C: drive must start with/drives/clike I have it above and that it must have forward slashes - of course the actual directories will differ)