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

2021-05-12 Thread TAKAHASHI,Toru (Jira)


 [ 
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}
> 
>  includes="**/${toString:main.class.relativepath}"/>
>  from="\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class"
>  to="\1"/>
> 
> {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-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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



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

2018-12-15 Thread TAKAHASHI,Toru (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722239#comment-16722239
 ] 

TAKAHASHI,Toru commented on NETBEANS-1788:
--

For Java Modular Project type, build-impl.xml is generated from build-impl.xsl
in source repository at 
java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/resources/build-impl.xsl.
in execution at java/modules/org-netbeans-modules-java-j2semodule.jar.




> 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
> 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}
> 
>  includes="**/${toString:main.class.relativepath}"/>
>  from="\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class"
>  to="\1"/>
> 
> {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
(v7.6.3#76005)

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

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



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

2018-12-14 Thread TAKAHASHI,Toru (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722022#comment-16722022
 ] 

TAKAHASHI,Toru commented on NETBEANS-1788:
--

One idea of fix this problem, at first convert path string with slash directory 
separator, then use regex.

# location of ${run.module.dir} with slash dirsep
{noformat}



{noformat}
# absolute path of main class with slash dirsep
{noformat}



{noformat}
# extract module name from absolute path of main class
{noformat}






{noformat}

> 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
> 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}
> 
>  includes="**/${toString:main.class.relativepath}"/>
>  from="\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class"
>  to="\1"/>
> 
> {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
(v7.6.3#76005)

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

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



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

2018-12-14 Thread TAKAHASHI,Toru (JIRA)


[ 
https://issues.apache.org/jira/browse/NETBEANS-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722006#comment-16722006
 ] 

TAKAHASHI,Toru commented on NETBEANS-1788:
--

Read build-impl.xml to realize the problem on Windows box.

To extract module name including main class, search main class file under 
${run.modules.dir}, then extract the directory name just under 
${run.modules.dir.location} by regexp.

||property name||value||variable||
|run.modules.dir|build/modules|fix|
|run.modules.dir.location|D:\work\Essen\build\modules|variable on user|
|toString:main.class.relativepath|com\torutk\essen\EssenApp.class|variable on 
user|
|file.separator|\|variable on OS|
|file.separator.string|\\|variable on OS|

The beginning of regex pattern without Windows may be as follows:

{noformat}
${run.modules.dir.location}${file.separator}([^${file.separator.string}]+)/.*\.class
{noformat}

To account Windows, file separator is back slash('\'),  use \Q and \E to escape.

{noformat}
\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class
{noformat}

But this account has problem when directory name starts with 'E'.



> 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
> 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}
> 
>  includes="**/${toString:main.class.relativepath}"/>
>  from="\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class"
>  to="\1"/>
> 
> {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
(v7.6.3#76005)

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

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



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

2018-12-14 Thread TAKAHASHI,Toru (JIRA)


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

TAKAHASHI,Toru updated NETBEANS-1788:
-
Description: 
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}




{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.

 

  was:
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}




{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'.

'\b' 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.

 


> 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
> 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}
> 
>  includes="**/${toString:main.class.relativepath}"/>
>  from="\Q${run.modules.dir.location}${file.separator}\E([^${file.separator.string}]+)\Q${file.separator}\E.*\.class"
>  to="\1"/>
> 
> {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 

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

2018-12-09 Thread TAKAHASHI,Toru (JIRA)
TAKAHASHI,Toru created NETBEANS-1788:


 Summary: 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
 Environment: OS: Windows 10 Pro, 64bit
JDK: OpenJDK 11.0.1 Windows 64bit
NetBeans: 10vc4
Reporter: TAKAHASHI,Toru


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}




{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'.

'\b' 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
(v7.6.3#76005)

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

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