Compiling Multiple Classes (Console) in Java

后端 未结 4 480
轮回少年
轮回少年 2020-12-09 21:35

I have 4 Classes for my project, they are (titleScreen, credits, storyScreen, and camapaign) respectively, since they are connected to each other, I don\'t know how to get i

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 21:58

    As others have said, some variation on javac *.java will do the trick. However, my suggestion is that you learn how to use a Java build tool:

    • The Apache Ant tool is the "moral equivalent" of the classic Make tool. You create an "build.xml" file containing the targets that you want to build in an OS independent fashion and the sequences of operations to be performed.

    • The Apache Maven tool is based on a different philosophy. Instead of saying how to build your code, you describe the code, its dependencies and the things that you want built. Maven takes care of the "how" of building ... plus lots more. This is more complicated in the short term, but (in my experience) it has lots of benefits in the long term.

提交回复
热议问题