Simple Makefile for java program

Viewed 29

Trying to create a Makefile for my java program in intelliJ. It is a file with 2 classes Opcode and my Main my opcode is setup to extend from my main and I have them both in my SRC folder. But when I try and run them and run the makefile it can never find the path.

$PATH: src/Main.java
    javac Main.java
    java Main

Is what I have now any suggestions on how to fix this?

1 Answers

You're better of using some tool for that ecosystem like gradle or maven. Using makefiles is not common except for c/c++ parts using JNI.

Related