I have a .exe
file in my system. that file was developed in java language
i have newly installed OS Win XP or any. and i don't have install java software in my system.then the file executed or not in my system ?
if executed How ? and where is the JVM is find out in system ?
if not executed Why we are saying java is platform indepennt ?
Java by default doesn't generate any executable file. It generates jar packages that are platform independent. The jar can be executed through the Java Virtual Machine (JVM), which is java.exe in Windows. This is the main software to execute Java applications. If you want/need to execute any Java application in your PC or device, it must have a JVM (distributed under the name Java Runtime Environment or JRE) installed and configured. If you want to go further and develop your own applications using Java, you will need to also install a Java Development Kit (JDK), note that every JDK already ships a JRE installation.
The fact your application has an additional exe file for Windows is that this exe will execute the JVM and the jar for you, and probably add some parameters to the JVM for the Java application execution.
There are some applications called Java Executable Wrappers. These can wrap your Java application (jar) and convert it into an exe, but note that even these applications will start a JVM process for you behind the scenes (usually executing java -cp <path>:. the.desired.package.MainClass
along with a set of JVM parameters), and some of them will fire the JVM download in case it is not properly installed. You can find more info about this here:
TL;DR
You need a Java Virtual Machine (JVM, JRE) to execute a Java application, regardless the device you're using.
Here's the link to download the latest Java JRE 8 version