Heelloooo good day. Thanks for seeking to help.

I am creating a Java program(obviously). At the end of my work I wish to install it as (a)an .exe file. However I wish that after its installation, file type association would have been setup automatically(I phrased that latter part of the statement like that, because I'm not sure if file association can be coded, or if it must be accomplished via other tools). I have ruled out JWS(Java Web Start) though.

SO once again:

  1. Program must be a(an) .exe file.
  2. And the installation process should seamslessly create the file type association without the user having to manually run any other commands.

May I please have some leads to follow?

Recommended Answers

All 6 Replies

if you want to create an .exe
here's a lead to follow: don't use Java.

Thank you

You need a Java native code compiler. Java normally compiles to JVM byte code, and can use the Just In Time (JIT) internal compiler of the JVM to convert your code to native code, but that code only exists until the program terminates. IE, you compile your code to Java .class files, put them into JAR files, and those are passed to the JVM to be executed. So, .EXE's are not part of the equation, unless as I said, you have a Java native code compiler available. Such are available on Linux as part of the GCC compiler suite. That is gcj. The native Windows Ming GCC compiler suite also has GCJ which CAN generate native Windows .exe files. Here is a link that will help: http://www.thisiscool.com/gcc_mingw.htm

FWIW, Ming is free and open source - no cost to you!

Does anyone have any experience with exe4j?

Thank you @rubberman.

there are tons of applications that 'll do this.
but to what advantage? a .jar file is already an executable. and just because you create a .exe doesn't mean you don't need a jre anymore.
it just means you won't be able to use your application in non-windows environments.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.