How to create this Java program?

How to create .exe file from a java program?

  • I just want to know How to create .exe file from a java program using cmd prompt Please answer in Step by step Please answer with due verification

  • Answer:

    Java has no such specification for creation .exe file. .exe and .jar both are executable file. .exe file can be creared by only using python,C or c++ Language. You can create .jar file using Java. You can search for converter software that convert a .jar file to .exe file.

Manash Sarma at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

You don't create .exe files from a Java source. You can however create an executable JAR file. Google it.

Kenneth

GCJ can compile java source code to a native binary. For windows, look into MinGW. @santanu bera: You're wrong. I just type "gcj --main=hi hi.java", and I get this mysterious file called "a.out" in my directory, which happens to be a binary for my native instruction set. All I do from there is run it like I would with any other binary - I don't even need a java run-time environment. Quite strange, don't you think? Not really. This is like trying to educate a moron who uses the terms "compiled language" and "interpreted language". Programming languages are languages. They're not compilers or interpreters. They can be compiled or interpreted, compiled to Java byte code or compiled to an executable format native to the platform you're using. Since we've decided that compiling from Java to your native binary format is normal. Consider the idea of compiling from a language which isn't Java, to Java byte code. That must be impossible. Java byte code was designed for Java after all, right? Pfffsh. Look: https://en.wikipedia.org/wiki/Java_Virtual_Machine#C_to_bytecode_compilers C to Java bytecode! How amazing. I would have never thought that was possible. EDIT: Oh, and since you're still just getting over the fact that there are programs which compile from Java to a native binary. Look here: http://gcc.gnu.org/java/ "It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code." Since there is an implementation of GCJ for Windows (MinGW). It should compile from Java to PE (Window's executable format). I haven't tried it since I don't use stupid, proprietary operating systems, but I'm sure it does.

henni

first create BAT file for all of your classes.........then you can convert the bat file to exe file via bat2exe converter.....check on google that how to create bat file.....

Mitul patel

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.