You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "TAKAHASHI,Toru (Jira)" <ji...@apache.org> on 2021/05/12 11:52:00 UTC

[jira] [Updated] (NETBEANS-1788) Java Modular Application Project build fail on Windows OS

     [ https://issues.apache.org/jira/browse/NETBEANS-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

TAKAHASHI,Toru updated NETBEANS-1788:
-------------------------------------
    Affects Version/s: 12.3

> Java Modular Application Project build fail on Windows OS
> ---------------------------------------------------------
>
>                 Key: NETBEANS-1788
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1788
>             Project: NetBeans
>          Issue Type: Bug
>          Components: projects - Java 9 MultiModule
>    Affects Versions: 10.0, 12.3
>         Environment: OS: Windows 10 Pro, 64bit
> JDK: OpenJDK 11.0.1 Windows 64bit
> NetBeans: 10vc4
>            Reporter: TAKAHASHI,Toru
>            Priority: Major
>
> h2. Problem
> BUILD FAILED to build application project generated from 'Java Modular Project'
> on Windows and include path element begin with 'E'.
> {noformat}
> compile:
> Building jar: D:\work\Essen\dist\com.torutk.essen.jar
> To run this application from the command line without Ant, try:
> C:\tools\jdk-11.0.1/bin/java -modulepath D:\work\Essen\build\modules com.torutk.essen.Main
> D:\work\Essen\nbproject\build-impl.xml:1218:
> java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 20
> \QD:\work\Essen\build\modules\\E([^\\]+)\Q\\E.*\.class
>     at java.base/java.util.regex.Pattern.error(Pattern.java:2015)
>     :
> {noformat}
>  
>  Error on build-impl.xml is as follows:
> {noformat}
> <pathconvert property="module.name">
>     <fileset dir="${run.modules.dir}" includes="**/${toString:main.class.relativepath}"/>
>     <regexpmapper from="\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class" to="\1"/>
> </pathconvert>
> {noformat}
> in regexpmapper, if 'run.modules.dir.locaion' includes any directory name begin with 'E', the 'E' following a file.separator (i.e. '\') is treated as ends quoting '\E'.
> So, trailing '\build' is treated as escape sequence '\b' and string 'uild'. '\b' is available escape scequence.
> Then, trailing '\modules' is treated as escape sequence '\m' and string 'odule'.
> '\m' is illegal escape sequence.
> h2. Reproducing Procedure
>  * [File]menu > [New Project] > [Java Modular Project]
>  * Name project begin with 'E' (for example, 'Essen')
>  * Add new module to the project
>  * Create Main class (with public static void main method)In this steps, build project is succeed because of no main class is set to the project.
>  * Run project once.The main class is set to the project.
>  * Build project, then BUILD FAILED occurrs.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists