Installing Java and Maven
Installing Java and Maven is the first step of this course. Maven is the tool that builds a Java app.
Check the Java version
This command asks for the Java version.
java -versionCheck the Maven version
This command asks for the Maven version.
mvn -versionExample
java -version
mvn -versionKey points
- Java is the language the apps in this course use.
- Maven is a tool that builds a Java app.
- Maven also fetches the libraries an app needs.
- A library is ready code that an app can use.
- Java 17 is the version this course uses.
- Check each install with a version command in a terminal.
- A terminal takes typed commands for the computer.
In this example, the first command asks for the Java version. The answer shows 17.0.21. The second command asks for the Maven version. The answer shows 3.9.11.
Note
Maven needs Java, so install Java first.
Try it Yourself
Edit the code, then press Run.
Running is simulated
Exercise
Which version of Java does this course use?