You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Peter Hull (JIRA)" <ji...@apache.org> on 2018/09/26 13:23:00 UTC

[jira] [Created] (NETBEANS-1304) Can't assign main class for modular project

Peter Hull created NETBEANS-1304:
------------------------------------

             Summary: Can't assign main class for modular project
                 Key: NETBEANS-1304
                 URL: https://issues.apache.org/jira/browse/NETBEANS-1304
             Project: NetBeans
          Issue Type: Bug
          Components: java - Project
    Affects Versions: 9.0
         Environment: Windows 10, 64-bit
JDK 11
NetBeans 9.0, 64-bit launcher
            Reporter: Peter Hull
         Attachments: Project.zip, three.png

If a Java modular project with a main class (i.e. one with public static main (...)) exports the class's package, the UI doesn't allow the main class to be chosen (when running for the first time, or via Run section of the project properties)
Steps to reproduce:
1. Create a new project and choose java ... java modular project
2. Add a module and a package
3. Add a main class to that package
4. Export that package from the module's module-info.java
5. Press F6 to run.
6. A dialog appears saying the project does not have a main class set, but there are no classes presented in the Select the main class: list

If step 4 is omitted, the class does appear in the list and the project can be run.

See attached screen shot and zipped project file.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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