Because exe’s have to be compiled for specific environments.
Oracle compiles their runtime (JRE) for different operating systems, which interprets your Java file anywhere that has a JRE installed. You can however make an installer for it:
Create Windows Installer for Java Programs
4
solved explain why java does not support the concept of executable file [closed]