I am struggling with a small-ish Problem i ran into
Description:
Technically my code works, but nothing happened when i double clicked it (it is supposed to open a GUI, being a replicate of Snake).
Opened the console to start it manually and see what is wrong. Told me i should try to add --enable-preview. I did so and it properly launched. Then i made a 1-line .bat script to do that for me.
Issue:
Then I sent it (.jar and .bat) to a friend to see if it works for him aswell. It didnt, since he doesnt have Java installed on his PC and therefor the batch isnt able to use the Java commands.
I looked into ways to convert jar's into exe's, downloaded Launch4j and ran into the issue from earlier, it needs --enable-preview to run
Launch4j has a command args line to write smth in, played around with it but no success.
Steps i have taken:
Spent hours of researching, found a few things which could help. But sadly, nothing worked.
I looked at how Minecraft deals with that, since it is in Java and runs out-of-the-box.
They have the JDK folded integrated into the game.
while it is a solution, not really viable for me to put the JDK into a little Game that isnt even a Megabyte.
Tldr:
I need to have the --enable-preview arg in my code, because otherwise Launch4j throws an error and i wont be able to convert it.
Why would i like to convert it? I want to learn how to make a proper App run out-of-the-box for future users who would want to try out my programs.
I ran out of ideas, so that's why i came here to ask for help
Thanks in advance!
Edit: I am using the VS Studio IDE
