rm -rf build/ mkdir build jars=$(find ./lib/ -iname "*.jar" | tr '\n' ':') find ./src -iname "*\.java" > files.txt $JAVAC_CMD -d build/ -cp $jars @files.txt
Okay, it is a very very unfair blog title – only an eye catcher!
But now you can bookmark this useful code snippet to compile your project without installing ant or even an IDE.
… and you could say: “Hey man – this is not platform independent!”.
But then I would say: “Oh yes it is! For windows you should install cygwin of course!”
Keep smiling 😉
Update: on windows with cygwin you have to replace the colon : with a semicolon ;