Yes, you can create OS-specific executables from java applications, a question has already been asked about this topic, for example here: Insert a JRE into a Windows executable?
Java is always compiled into OS-independent byte code that can only be executed on a Java virtual machine, such as the one that comes with the JRE.
Just because you marked your question βeclipseβ and mentioned the file βexeβ ... just in case you created the RCP eclipse application, then there is an elegant way to associate the application with the Java runtime: Just create a folder called "jre" inside your application directory (at the same level as the plugin and the function folder) and copy the JRE to this folder. On eclipse export pages, a checkbox can be checked to associate the application with the JRE.
source share