Question: can jre compile java code?
Answer: No you can't develop java programs only with JRE. You will need JDK for compiling your programs. JRE provides only runtime environment,but JDK is something you will need to compile your code to make them executable by your JRE . You will need javac for compiling your code which is present in JDK .