Created
May 22, 2017 20:08
-
-
Save miss-invincible/f4160b34b003dcacb3ba3b30cef9a6b6 to your computer and use it in GitHub Desktop.
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
Open a command prompt. | |
Go to the directory where you have your .java files | |
Create a directory "build" | |
Run java compilation from the command line | |
javac -d ./build *.java | |
#if there are multiple files to be jarred or | |
javac -d ./build file_name.java | |
#for jarring a single file | |
to compile in the current directory: | |
javac -d . *.java | |
to use another jar for compiling java file: | |
javac -d -classpath ~/Downloads/hadoop-core1.2.1.jar ./build *.java | |
now to crete jar of compiled classes: | |
jar cvf YourJar.jar kmeans*.class | |
(mention kmeans*class instead of just * as jar needs to know all the files added.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment