Valid characters in a module name

Remi Forax forax at
Sun Jan 1 13:17:29 UTC 2017


Just to be sure, you are talking about module name for the VM and not module name for Java the language,
as usual, module name for Java are more restricted than module name that can be generated by something which is not javac.

The section 2.1 contains more restrictions on module names that the one you have quoted,
so spaces are not allowed.

The idea is that if we want an existing module system not necessarily defined in Java to be mapped to the JPMS environment, there is no reason to add arbitrary rules like the ones you propose for quotes.
For spaces, i fully agree with you, debugging a module configuration that allows ' ' or '\t' in module name will be awful, that why they are not allowed.


----- Mail original -----
> De: "Ess Kay" <s.2016.kay at>
> À: jigsaw-dev at
> Envoyé: Dimanche 1 Janvier 2017 02:43:28
> Objet: Valid characters in a module name

> "JPMS: Modules in the Java Language and JVM" at
> says
> that a module name can contain almost any character.  If this is indeed the
> case then it is going to make the development of scripting languages that
> specify module names quite complicated.
> Would it be too big a compromise to specify that a module name must not
> contain
> 1) double quotes,
> 2) single quotes,
> 3) spaces,
> 4) forward slashes or
> 5) asterixes?
> Put another way, what advantage is there in allowing a module name to start
> with or contain a double quote or space etc?
> Taking a step backwards, would it be too much of a compromise to specify
> that module names should only contain characters that are valid in a Java
> class name perhaps with the exception of a few special characters?

More information about the jigsaw-dev mailing list