1

Dashes are not allowed in the JPMS module names. As I understand it is suggested to replace them with dots.

However I cannot find a list of other not allowed characters in Java modules names with replacement suggestions. For example, is "_" character allowed?

Naman
  • 27,789
  • 26
  • 218
  • 353
matandked
  • 1,527
  • 4
  • 26
  • 51
  • 2
    Closely related [How should I name my Java 9 module?](https://stackoverflow.com/questions/43192741/how-should-i-name-my-java-9-module) – Naman Jan 09 '20 at 10:29

1 Answers1

5

The Java Language Specification, section 7.7. Module Declarations, says:

A module name consists of one or more Java identifiers (§3.8) separated by "." tokens.

So the valid characters for a module name is the same as for the fully qualified name of a class.

Andreas
  • 154,647
  • 11
  • 152
  • 247