I have a task to create xxxxx.jar
executable file that mast be run with:
java xxx.jar
I have tried to do this with gradle by setting
jar {
manifest {
attributes 'Main-Class': 'com.Main'
}
}
but once I run java xxxxx.jar
I get:
Error: Could not find or load main class xxxxx.jar
I how ever i can run it with java -jar xxxxx.jar
but I need to execute the file just with java xxxxx.jar
What can change to run it just with java xxxxx.jar
. I suspect this might be some where in the gradle file.