'How do i make a .jar file acessible to anyone?

I've made a game, have already exported it from eclipse to a .jar file, but none of my friends could open the file. "java virtual machine launcher: a java exeption has occured" appeared to all of them.

So i tried to find a way to turn this .jar file in an .exe file, and it kinda worked. Using launch4j aplication, i was able to create an .exe, but it still didn´t work for everyone (except me). for some reason, it doesn´t matter what i try, the only one who can open the file is me.

i have already:

  • turned it into .exe (worked for me, failed for everyone)
  • tried to bundle a jre by indicating path (failed)
  • bundled a jre by tipping %JAVA_HOME% at bundled jre section (worked for me, java version error for everyone)
  • let min and max java version requiriments empty (worked for me, java version error for everyone)

and now I don't know what to do, i searched so deep in the internet, but all possible answers appears to do nothing. I don´t now if i made a mistake in launch4j or if I have a problem in my java instalation itself, but i simply can't publish my project whitout solving this problem. Do anyone have any sugestions?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source