I would like to make a custom command, which can invoke my java class. I am not sure how to proceed with it.
I don't want to use java < classname> instead I want to create a custom command say mycmd which would run the java class.
I would like to make a custom command, which can invoke my java class. I am not sure how to proceed with it.
I don't want to use java < classname> instead I want to create a custom command say mycmd which would run the java class.
Depending upon which OS you're working on, you can always create either batch(.bat for windows) or shell(.sh for unix/linux/mac etc). Pass class name as parameter. Call java command under the script with passed classname.
Just make a file called mycmd that has a single line with:
java classname
then run the file by typing mycmd at the command line.