i have a small swing gui Java app and created a launcher (.exe) with launch4j.
As i dont want to have the jar included in the launcher i checked the option "Dont wrap the jar, launch only".
Therefore the small exe will execute my jar. But i dont want the user to execute my jar through the command prompt or anyway else.
is there a way to deny the startup of my jar?
regards Nur1
the Launch4j has <cmdLine> Optional, constant command line arguments.
which enable you to pass some arguments to main
method of application to run it. so you can pass some arguments through the Launch4j
to jar
file and check that parameter and prevent from running by command line.