3

Is anyone else having this issue when they run the module it complains about this in java 9 mac version?

Below is the issue!

Unrecognized option: -modulepath
Error: Could not create the Java Virtual Machine.

How to reproduce ? I am doing this example. The last step is to run the module using below command. That's when i see the issue.

java -modulepath mods -m com.mycompany.helloworld/com.mycompany.helloworld.HelloWorld

Here is some background information. . I started playing with java 9 (mac version).

java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+138)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+138, mixed mode)

I can not even uninstall the java 9 properly. But, I will solve that later.

any help will be appreciated!

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
JLP
  • 311
  • 2
  • 3
  • 12
  • 2
    Not at my computer but try `--module-path` - I believe there was a standardisation effort for Unix like options. – Joop Eggen Oct 05 '16 at 20:24

1 Answers1

3

As Joop Eggen have said, there is an effort in the JDK to standardize the command-line options and use the GNU-style --starting-with-double-dash-and-dash-separated-long-options. So yes, --module-path is what you're looking for.

For the reference:

Stanislav Lukyanov
  • 2,147
  • 10
  • 20