Skip to content

Instantly share code, notes, and snippets.

@mehikmat
Created May 8, 2015 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehikmat/c762236cabbf4966f39a to your computer and use it in GitHub Desktop.
Save mehikmat/c762236cabbf4966f39a to your computer and use it in GitHub Desktop.
This gist contains the very simple instructions to run java application from command line
First make java jar containing your all code.
Then got to terminal
$ cd project_root_dir/target
$ java -cp ./jar_file.jar com.main_class_name param_to_main_class [if jar doesn't contain manifest file]
$ java -jar jar_file.jar [if jar contains manifest file]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment