I have a Java project in Eclipse. It works fine and I can run it from cmd using java -jar sample-app.jar
I now have to use Gradle to produce an executable sh
file for use in Linux.
I've found some resources on creating start scripts but the most I've managed to do is use the standard 'startScripts' task to create a sample.app.bat file.
I've scoured question after question and page after page on google to try and find an answer and I'm not having much luck. I've also read through the Gradle Application plugin documentation a number of times and still quite confused.
How do I write a Gradle task to generate an sh
file to execute my sample-app.jar file?
Note: The sample-app.bat file does no execute. It only produces an "Error: Cannot find or load main class com.sample.MainClass