1

So I have completed my program, which uses a database inside of phpMyAdmin / workbench.

How is it possible to pack the program as a .exe, along with the database so that the end client (my mothers charity) doesn't have to install workbench and the database?

P.s: I have exported the project as a runnable .jar file, but I am unable to get it to an .exe file? what must I do?

Thanks in advance, Josh

  • You can ["convert"](http://stackoverflow.com/questions/147181/how-can-i-convert-my-java-program-to-an-exe-file) a jar to exe (result is essentially a file that contains the jar. When starting the exe it searches for a java runtime on the pc and launches the included jar). There is nothing to my knowledge that also includes an installer for a fully configured database. You can try to create a batch file that does it but it's probably easier to do it manually. – zapl Sep 18 '13 at 17:16
  • http://stackoverflow.com/questions/147181/how-can-i-convert-my-java-program-to-an-exe-file – mike Sep 18 '13 at 17:29
  • So I used this guide: [link](http://www.wikihow.com/Create-an-Executable-File-from-Eclipse) and was able to make it an exe, but it does nothing! But if it is a .jar file, it wont run on other computers, I tried. –  Sep 18 '13 at 18:19
  • Create an executable jar file with the needed libraries. Why do you want an `.exe`? – mike Sep 18 '13 at 19:55
  • So that I can run it on another pc. I transferred the .jar file to my laptop (with all the jdk's and jre's) and tried to run it, but it did nothing. –  Sep 19 '13 at 04:12
  • Then you did it **wrong**. Inform yourself on how to create an executable jar. – mike Sep 19 '13 at 09:36

1 Answers1

0

You could write a little C++ program that calls the jar. It should also check if there is a JVM installed etc.

E. g. Let c/programs/myprogram/ be a directory; you put your jar and the exe that calls the jar in this directory. Then you could create a desktop shortcut etc.


Maybe there are there are solutions that automate this process, but I don't have any at hand right now.

mike
  • 4,929
  • 4
  • 40
  • 80
  • I dont know C++, this is my major project for the year, so there is no time to go learn C++ unfortunately. But thanks! –  Sep 18 '13 at 18:18