Making a Java Makefile

For a simple project without many files or dependencies, I simply use scripts.

To build:

javac -cp .;* *.java

To run:

java -cp .;* SomeMainClass

Replace . with whatever path(s) you need for your source. The * will use any jar on the default path or use a different path like lib/*.

Leave a Comment