So I have 3 classe in a java program (let's call them main.java, 1.java and 2.java).
2.java is called in 1.java and 1.java in main.java
What would a makefile for this be. Internet was /not/ helpfull at all.
Thank is advance for your help, have a nice day.
Bump.
Do you really need a makefile? Java normally just uses the right files if they are in the same folder. Just run main.java
>>236671
Java doesn't use makefiles, because it's not from the '70s and isn't kneecapped by single-pass compliation. Just feed the compiler all the source files at the same time, and it will sort everything out for you.
javac *.java
java main
>>236693
Sadly, yes. My assistants are assholes.
>>236694
>javac *.java
>java main
So I just have to run that? Thanks.
>>236707
Here's a makefile that will work for any Java project too small to be using packages:
all: binary
binary:
<tab>javac *.java
distclean: clean
clean:
<tab>rm -f *.class
'member to put an actual tab where it says <tab>.
>>236708
Thanks a lot.