[
https://issues.apache.org/jira/browse/NETBEANS-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550688#comment-16550688
]
Geertjan Wielenga commented on NETBEANS-1058:
---------------------------------------------
These open and run without a problem in Apache NetBeans:
https://github.com/GeertjanWielenga/JigsawJavaModularProjectSamples
> Cannot "Run File" from within Netbeans "Module"
> -----------------------------------------------
>
> Key: NETBEANS-1058
> URL: https://issues.apache.org/jira/browse/NETBEANS-1058
> Project: NetBeans
> Issue Type: Bug
> Affects Versions: 9.0
> Environment: Running on Windows 10 Pro, 64-bit, using Netbeans 9rc1
> with Java 10.0.1.
> Reporter: Dan Reese
> Priority: Major
> Fix For: 9.0
>
>
> Created a Module with one class (Main). It appears to compile OK, but will
> not run. The problem occurs whether the Build/Packaging is set to create
> JLink distribution, or not. Tried to run the project and also tried to "Run
> File" and the problem occurred there as well:
> package testmodule;
> public class Main {
> public static void main(String[] args) {
> System.out.println("Hello World from module!");
> }
> }
>
> This breaks to an exception (see below) when trying to run from within
> Netbeans. It compiles and runs outside of Netbeans, from the command line. I
> can also create a jre with JLink from the command line.
> When I compare the directories at the command line with those created by
> Netbeans, the Netbeans folder with the class files does not contain a
> reference to java.base.jmod. Perhaps this is the issue, although Netbeans
> appears to be aware of it in the project Libraries. Anyway, I can't find any
> configuration setting that works.
> Also, I get constant, ongoing exception messages whenever I try to do
> anything in the Module. Is Netbean 9 Module-friendly, or is it just focused
> on jar files?
> The log file would not attach, as requested. Instead, here is the exception
> message:
> java.lang.UnsupportedOperationException: command: run, JavaRunner impls:
> [org.netbeans.modules.java.source.ant.ProjectRunnerImpl@5204929b]
> at
> org.netbeans.api.java.project.runner.JavaRunner.execute(JavaRunner.java:303)
> at
> org.netbeans.modules.java.api.common.project.ActionProviderSupport.bypassAntBuildScript(ActionProviderSupport.java:583)
> at
> org.netbeans.modules.java.api.common.project.JavaActionProvider$9.performCompileOnSave(JavaActionProvider.java:1591)
> at
> org.netbeans.modules.java.api.common.project.ActionProviderSupport$JavaModelWork.execute(ActionProviderSupport.java:1308)
> at
> org.netbeans.modules.java.api.common.project.ActionProviderSupport$JavaModelWork.run(ActionProviderSupport.java:1285)
> at
> org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(ScanDialog.java:133)
> at
> org.netbeans.modules.java.api.common.project.ActionProviderSupport.invokeTarget(ActionProviderSupport.java:202)
> at
> org.netbeans.modules.java.api.common.project.JavaActionProvider$ScriptAction.invoke(JavaActionProvider.java:465)
> at
> org.netbeans.modules.java.api.common.project.JavaActionProvider.lambda$invokeAction$1(JavaActionProvider.java:895)
> at java.base/java.util.Optional.ifPresent(Optional.java:172)
> at
> org.netbeans.modules.java.api.common.project.JavaActionProvider.invokeAction(JavaActionProvider.java:888)
> at
> org.netbeans.spi.project.support.LookupProviderSupport$MergedActionProvider.invokeAction(LookupProviderSupport.java:262)
> at
> org.netbeans.modules.project.ui.actions.ProjectAction$2.run(ProjectAction.java:162)
> at
> org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:95)
> at
> org.netbeans.modules.openide.util.NbMutexEventProvider$Event.writeAccess(NbMutexEventProvider.java:60)
> at
> org.netbeans.modules.openide.util.LazyMutexImplementation.writeAccess(LazyMutexImplementation.java:56)
> at org.openide.util.Mutex.writeAccess(Mutex.java:285)
> at
> org.netbeans.modules.project.ui.actions.ProjectAction.runSequentially(ProjectAction.java:159)
> at
> org.netbeans.modules.project.ui.actions.MainProjectAction$1$1.run(MainProjectAction.java:115)
> at
> java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
> at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
> at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
> at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
> at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
> at java.base/java.security.AccessController.doPrivileged(Native Method)
> at
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
> at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
> at
> org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
> [catch] at
> java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
> at
> java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
> at
> java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
> at
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
> at
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
> at
> java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists