Which set of commands is necessary to create and run a custom runtime image from Java source files?
Which set of commands is necessary to create and run a custom runtime image from Java source files?
To create and run a custom runtime image from Java source files, you need to first compile the Java source files (.java) into bytecode (.class) using the `javac` command. Then, use the `jlink` command to create a custom runtime image that includes the necessary modules and your application. This combination ensures that you have both the compiled code and the tailored runtime environment required for running your Java application.
The correct answer is B. To create and run a custom runtime image from Java source files, you need to use the `javac` and `jlink` commands. First, you use the `javac` command to compile the Java source files into class files. Then, you use the `jlink` command to create a custom runtime image that includes only the modules required by your application. Once the custom runtime image is created, you can run your application using the `java` command from within the custom runtime image.
B is correct
javac jlink
C is the correct answer javac, jlink
Is the answer correct??