Created
September 17, 2017 10:57
-
-
Save mahradbt/c042a37af88547a415187dde53e896ab to your computer and use it in GitHub Desktop.
script for simple java app jar file on linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
touch hello.java | |
echo 'class Hello{public static void main(String[] args){System.out.println("Hello World");}}' > hello.java | |
javac hello.java | |
touch MANIFEST.MF | |
echo "Main-Class: Hello" > MANIFEST.MF | |
jar cmfv MANIFEST.MF Hello.jar *.class | |
java -jar Hello.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment