Compiling multiple modules with the Java 9 compiler
Create a sub-folder named mods
within the base directory named Renderer
. This new sub-folder will replicate the directory structure that we created in the Renderer/src
(Renderer\src
in Windows) folder. We will run the Java compiler to generate a Java class file for each Java source file. A Java class file will contain Java bytecode that can be executed on the Java Virtual Machine, also known as the JVM. We will have a file with the .class
extension for each Java source file with the .java
extension, including the module descriptors. For example, after we successfully use the Java compiler to compile the Renderer/src/com.renderer.math/com/renderer/math/Vector3d.java
source file, the compiler will generate a Renderer/mods/com.renderer.math/com/renderer/math/Vector3d.class
file with Java bytecode (known as a Java class file). In Windows, we must use a backslash (\
) as the path separator instead of the slash (/
).
Now, open a Terminal window...