When I start a new Java project in eclipse, the first popup screen allow me to choose which JRE to use.
I have 3 choices.
- Use an execution enviorment JRE: JavaSE1.7
- Use a project specific JRE:
- Use a default JRE(curretly ‘jre7’)
But when I use eclipse’s build-in export to Runnable JAR File to create an executable JAR, the JAR file will only run (by double clicking) if I select jre7 instead of eclipse’s default choice JavaSE1.7
Can someone please tell me what is the difference between developing the java program in JavaSE1.7 vs jre7? Or have I used the wrong method to create an executable JAR?
Thanks in advance.
Try this…
JavaSE 1.7 is an acronym for Java to Standard Edition Version 1.7 or Version 7 (both are same), which is used for running on Desktops, Server,etc…
JRE is the Runtime Environment , in which the compiled java application runs…
The reason your executable jar runs, when you select the JRE instead of JSE is because, JRE is the runtime environment (the sandbox) which is needed by the application to run, not JSE.. JSE is just the acronym given to Java’s Standard Edition.
And for creating a Runnable jar in Eclipse follow the below method..