You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Geertjan Wielenga (Jira)" <ji...@apache.org> on 2019/10/21 15:10:00 UTC

[jira] [Commented] (NETBEANS-3260) Ant scripts for building Java projects using modules give wrong output

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

Geertjan Wielenga commented on NETBEANS-3260:
---------------------------------------------

Indeed, the info in the output is incorrect, the syntax (for an Anagram game I created and is on GitHub) should be like this:

 /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home/bin/java --module-path /Users/geertjanwielenga/Downloads/JigsawJavaModularProjectSamples-master/AnagramGame/build/modules -m com.toy.anagrams/com.toy.anagrams.ui.Anagrams

Notice the following:

--module-path
 -m <module-name>/<main-class>

See also: https://stackoverflow.com/questions/49520858/error-occurred-during-initialization-of-boot-layer-findexception-module-not-fou

So yours should probably be:

C:\Program Files\Java\jdk-12.0.1/bin/java --module-path D:\Peter\Netbeans\TestModules1\build\modules -m com.ptoye.greetings/com.ptoye.greetings.Main

Please confirm.




> Ant scripts for building Java projects using modules give wrong output
> ----------------------------------------------------------------------
>
>                 Key: NETBEANS-3260
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3260
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Compiler
>    Affects Versions: 11.1
>         Environment: Netbeans 11.1 Windows 7
>            Reporter: Peter Toye
>            Priority: Minor
>         Attachments: TestModules1.zip
>
>
> The attached project - a very simple one with 2 modules - gives incorrect output for the command-line. The output is
> {{C:\Program Files\Java\jdk-12.0.1/bin/java -modulepath D:\Peter\Netbeans\TestModules1\build\modules com.ptoye.greetings.Main}}
> I think it should be more like
> {{"C:\Program Files\Java\jdk-12.0.1/bin/java" --module-path D:\Peter\Netbeans\TestModules1\build\modules -m com.ptoye.greetings.Main}}
>  but even this gives an error:
> {{Error occurred during initialization of boot layer}}
> {{java.lang.module.FindException: Module com.ptoye.greetings.Main not found}}
> so there's obviously still something wrong which I haven't yet worked out.



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