Skip to content

Instantly share code, notes, and snippets.

@tushortz
Last active February 14, 2023 05:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tushortz/5fc717d4bddedf5b560b to your computer and use it in GitHub Desktop.
Save tushortz/5fc717d4bddedf5b560b to your computer and use it in GitHub Desktop.
Java, JavaDoc, JAR build System for Sublime text (Linux) including Wordcount and File list support.
{
"cmd": ["javac '$realpath$file' && java $file_base_name && rm *.class"],
"selector": "source.java",
"shell": true,
"variants": [
{
"name": "JavaDoc",
"cmd": ["mkdir documentation && javadoc -d documentation *.java"]
},
{
"name": "JAR",
"cmd": ["javac '$realpath$file' && echo \"Main-Class: $file_base_name\" > Manifest.txt && jar cfm $file_base_name.jar Manifest.txt *.class && rm *.class && java -jar $file_base_name.jar"]
},
{
"name": "List Files",
"cmd": ["ls"],
},
{
"name": "Word Count",
"cmd": ["wc", "$file"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment