I'm interested in switching from NetBeans over to IntelliJ for the
development of MicroManager (MMStudio and plugins). I've added the
dependency .jar files to the "Libraries" section and set up some of the
other obvious steps such as setting a working Micromanager installation
directory as my working path.
When I try to run MMStudio the splash screen appears successfully but after
clicking "Ok" the program crashes with the following error:
[ ] java.lang.NullPointerException in
[ ] at
It should be noted that I have run into this problem before when trying to
use Netbeans 11 instead of Netbeans 9 so this may be more of a Micro-Manager
issue than an IntelliJ issue.
After some digging I found that the cause of this issue is that
DefaultPluginManager.loadPlugins() is not finding any of the SciJava plugins
defined in "org.micromanager.quickaccess", however the reason that these
plugins are not found is a mystery to me.
Does anyone know how I can resolve this issue?
Alternatively even if you don't know what the problem is but you have
IntelliJ successfully set up with Micro-Manager would you be willing to send
me the `.idea` project folder so that I might be able to figure it out
Re: Help setting up IntelliJ for MMStudio development
Answering my own question here: I was able to get things working by adding
"MMJ_.jar" as a library in my project settings. I'm not exactly sure what
the effects of this will be. It seems a bit strange for the project to be a
dependency of itself.
This appears to happen because the QuickAccess plugins are defined in the
source code but are not actually used or imported anywhere. Since they are
still part of the source code they aren't found by the classloader.
Still hoping that someone with better understanding of Java classloaders can
tell my there's a better solution here. I'm not sure why Netbeans 9 works
without adding MMJ_.jar as a dependency but Netbeans 11 and IntelliJ do not.