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
  • 21,685
  • 24
  • 196
  • 332
matandked
  • 1,387
  • 3
  • 22
  • 48
  • 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
  • 147,606
  • 10
  • 133
  • 220