To package a Java file into a jar file either for direct executable or for purpose of just packaging everything
jar -cf graphmaker.jar ./
This assumes that everything to be packaged is under the current directory.
to execute the file from command line, below command can be used
java -cp graphmaker.jar GraphMaker log_1.txt "word to scan in the file"
References:
https://docs.oracle.com/javase/tutorial/deployment/jar/
No comments:
Post a Comment