Multiple MM windows as ImageJ plugIns

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple MM windows as ImageJ plugIns

Mahesh Kakuturu
Hi everyone,

I am trying to open Multiple Micro-Manager windows from ImageJ with two plugins.
I was able to add two plugins after modifying the plugins_mmstudio.config and made separate build of that MM project and placed under plugins folder. When I run the plugins, both are accessing MMStudio class defined in first recognized jar file (AFMJ_.jar). Other plugin jar file is MMJ_.jar.
Even after changing the MMStudio class name in other project jar file, it has the same problem.
I am not an expert of java. Seems somewhere in build configuration or other place the entry class of MMStudio is mentioned for plugins.
Can some one help me to identify this? Your help is greatly appreciated.


--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Multiple MM windows as ImageJ plugIns

Nico Stuurman-2
Hi Mahesh,

I am trying to open Multiple Micro-Manager windows from ImageJ with two plugins.
I was able to add two plugins after modifying the plugins_mmstudio.config and made separate build of that MM project and placed under plugins folder. When I run the plugins, both are accessing MMStudio class defined in first recognized jar file (AFMJ_.jar). Other plugin jar file is MMJ_.jar.
Even after changing the MMStudio class name in other project jar file, it has the same problem.
I am not an expert of java. Seems somewhere in build configuration or other place the entry class of MMStudio is mentioned for plugins.

Micro-Manager was very much written as a singleton application and it will be extremely difficult (read a lot of work), to re-design it so that multiple instances can be run in the same JVM.  Micro-Manager 2.0 is better in that respect than 1.4, but I do believe that there is still room for only one Core. 

Best,

Nico


Can some one help me to identify this? Your help is greatly appreciated.


--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Multiple MM windows as ImageJ plugIns

Mahesh Kakuturu
Hi Nico,

Thanks for your reply. I figured it out the problem. JVM is not loading duplicate classes from the jar files. I literally renamed each and every class in the MM 1.4 code to avoid duplicate classes. That did the trick. Now I am able to open one ImageJ and two MM windows with two live streams of my AmScope camera and demo camera.
Eventually demo camera is going to replace with my AFM live image. So, I can have camera live stream and AFM live stream from one application. Hopefully MMCore won't trouble me when loaded twice from the same location.

Thanks,
Mahesh.


On Tue, Sep 19, 2017 at 12:15 PM, Nico Stuurman <[hidden email]> wrote:
Hi Mahesh,

I am trying to open Multiple Micro-Manager windows from ImageJ with two plugins.
I was able to add two plugins after modifying the plugins_mmstudio.config and made separate build of that MM project and placed under plugins folder. When I run the plugins, both are accessing MMStudio class defined in first recognized jar file (AFMJ_.jar). Other plugin jar file is MMJ_.jar.
Even after changing the MMStudio class name in other project jar file, it has the same problem.
I am not an expert of java. Seems somewhere in build configuration or other place the entry class of MMStudio is mentioned for plugins.

Micro-Manager was very much written as a singleton application and it will be extremely difficult (read a lot of work), to re-design it so that multiple instances can be run in the same JVM.  Micro-Manager 2.0 is better in that respect than 1.4, but I do believe that there is still room for only one Core. 

Best,

Nico


Can some one help me to identify this? Your help is greatly appreciated.


--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general




--
Best Regards,
Mahesh Kakuturu
Sr. Software Engineer
Angstrom Science, Inc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general