I am making a very crude text based game in kotlin that runs on the windows cmd. The game i am making uses println() and readln() for outputs and inputs (kind of like a simple hello world program). The game also has a saving feature that uses FileWriter and FileReader to make a .txt file containing data. I am using a single .kt file for the entire game, how do i turn the .kt file into a runnable .exe as compiling it to .jar and using launch4j doesnt work.
The only libraries i am using are:
java.io.FileWriter
java.io.FileReader
I have tried to compile it to .jar and use launch4j to make it into a .exe file, the .jar file works fine when ran on the cmd, but the exe file does nothing.
I am expecting the .exe file to open windows cmd and automatically run the .kt file there.
I also want the file to be able to create and read a .txt file using the FileWriter and FileReader java libraries.
GMCMarshy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.