nerdexam
Oracle

1Z0-815 · Question #19

Which command line runs the main class com.acme.Main from the module com.example?

The correct answer is D. java -classpath com.example.jar -m com.example/com.acme.Main. See the full explanation below for the reasoning.

Question

Which command line runs the main class com.acme.Main from the module com.example?

Options

  • Ajava --module-path mods com.example/com.acme.Main
  • Bjava -classpath com.example.jar com.acme.Main
  • Cjava --module-path mods -m com.example/com.acme.Main
  • Djava -classpath com.example.jar -m com.example/com.acme.Main

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    3% (1)
  • C
    13% (4)
  • D
    77% (23)

Community Discussion

No community discussion yet for this question.

Full 1Z0-815 Practice