top bar

Difference between revisions of "Using Netbeans"

(Fixed various outdated things.)
Line 1: Line 1:
The following instructions for debugging Micro-Manager with Netbeans are intended to work on Windows or Mac.
+
The following instructions for debugging Micro-Manager's Java code with Netbeans are intended to work on Windows or Mac.
  
 
<ol>
 
<ol>
 
<li>Download and install Micro-Manager.</li>
 
<li>Download and install Micro-Manager.</li>
<li>Use [http://subversion.tigris.org/ subversion] to download a copy of the latest Micro-Manager [http://micro-manager.org/downloads.php?object=source source] (1.3 or 1.4) as well as 3rdpartypublic, at [https://valelab.ucsf.edu/svn/3rdpartypublic/ https://valelab.ucsf.edu/svn/3rdpartypublic/].<br>These two directories should reside in the same parent directory, e.g. <code>projects/micromanager/</code> and <code>projects/3rdpartypublic/</code></li>
+
<li>Use [http://subversion.tigris.org/ subversion] to download a copy of the latest [http://micro-manager.org/wiki/Micro-Manager_Source_Code Micro-Manager source and 3rdpartypublic]. The two directories should reside in the same parent directory, e.g. <code>projects/micromanager/</code> and <code>projects/3rdpartypublic/</code></li>
<li>Download, install and run [http://netbeans.org Netbeans].</li>
+
<li>Download, install and run [http://netbeans.org Netbeans] (the Java SE Bundle is sufficient).</li>
 
<li>Choose '''File''' > '''New Project...''' >  [Categories] '''Java''' > [Projects] '''Java Project with Existing Sources'''. Press '''Next'''.
 
<li>Choose '''File''' > '''New Project...''' >  [Categories] '''Java''' > [Projects] '''Java Project with Existing Sources'''. Press '''Next'''.
<li>Give your project a name and press '''Next'''.</li>
+
<li>Give your project a name. The '''Project Folder''' is best saved outside of the Micro-Manager source directory. Press '''Next'''.</li>
<li>Click '''Add Folder''' at right and browse to <code><micromanager_source_directory>/mmstudio/src</code>. Press '''Next'''.
+
<li>Under '''Source Package Folders''', click '''Add Folder''' at right and browse to <code><micromanager>/mmstudio/src</code>. If you want to develop a plugin, you can also add <code><micromanager>/plugins/*/src</code> at this time. Press '''Next'''.
 
<li>Include all files ('''**'''). Press '''Finish'''.
 
<li>Include all files ('''**'''). Press '''Finish'''.
 
<li>Right-click your project in the '''Projects''' tab (probably at left) and select '''Properties'''.</li>
 
<li>Right-click your project in the '''Projects''' tab (probably at left) and select '''Properties'''.</li>
<li>Select '''Libraries''' under '''Categories'''. Click '''Add Jar/Folder''' and add all jars in <code>3rdpartypublic/classext</code>.<br>
+
<li>Select '''Libraries''' under '''Categories'''. Make sure the '''Java Platform''' matches the version of Micro-Manager you are using (e.g., 64-bit JDK 1.6).</li>
Click '''Add Jar/Folder''' again and choose <code><your_micromanager_installation_directory>/plugins/Micro-Manager/MMCoreJ.jar</code>.<br>
+
<li>Under '''Compile''' > '''Compile-time Libraries''', click '''Add Jar/Folder''', select '''Relative Path''' on the right, and add all jars in <code>3rdpartypublic/classext</code>.</li>
Make sure the '''Java Platform''' matches the version of Micro-Manager you are using (e.g., 32-bit JDK 1.5).</li>
+
<li>Click '''Add Jar/Folder''' again and choose <code>MMCoreJ.jar and MMAcqEngine.jar</code> in <code><your_micromanager_installation_directory>/plugins/Micro-Manager/</code>.</li>
 
<li>Select '''Run''' under '''Categories'''. For the <default config>, set the following parameters: <ul><li>'''Main Class:'''  <code>ij.ImageJ</code></li>
 
<li>Select '''Run''' under '''Categories'''. For the <default config>, set the following parameters: <ul><li>'''Main Class:'''  <code>ij.ImageJ</code></li>
 
<li>'''Working Directory:''' <code><your_micromanager_installation_directory></code></li>
 
<li>'''Working Directory:''' <code><your_micromanager_installation_directory></code></li>
<li>'''VM options:''' <code>-d32 -Xmx600M</code> (for 64 bit use <code>-d64 -Xmx3000M)</code>.</li></ul>
+
<li>'''VM options:''' <code>-Xmx600M</code> (for 64 bit use <code>-Xmx3000M)</code>.</li></ul>
 
<li>Click '''OK''', sacrifice a goat, and then right-click your project and choose '''Debug'''.
 
<li>Click '''OK''', sacrifice a goat, and then right-click your project and choose '''Debug'''.
 
</li>
 
</li>

Revision as of 11:37, 22 November 2013

The following instructions for debugging Micro-Manager's Java code with Netbeans are intended to work on Windows or Mac.

  1. Download and install Micro-Manager.
  2. Use subversion to download a copy of the latest Micro-Manager source and 3rdpartypublic. The two directories should reside in the same parent directory, e.g. projects/micromanager/ and projects/3rdpartypublic/
  3. Download, install and run Netbeans (the Java SE Bundle is sufficient).
  4. Choose File > New Project... > [Categories] Java > [Projects] Java Project with Existing Sources. Press Next.
  5. Give your project a name. The Project Folder is best saved outside of the Micro-Manager source directory. Press Next.
  6. Under Source Package Folders, click Add Folder at right and browse to <micromanager>/mmstudio/src. If you want to develop a plugin, you can also add <micromanager>/plugins/*/src at this time. Press Next.
  7. Include all files (**). Press Finish.
  8. Right-click your project in the Projects tab (probably at left) and select Properties.
  9. Select Libraries under Categories. Make sure the Java Platform matches the version of Micro-Manager you are using (e.g., 64-bit JDK 1.6).
  10. Under Compile > Compile-time Libraries, click Add Jar/Folder, select Relative Path on the right, and add all jars in 3rdpartypublic/classext.
  11. Click Add Jar/Folder again and choose MMCoreJ.jar and MMAcqEngine.jar in <your_micromanager_installation_directory>/plugins/Micro-Manager/.
  12. Select Run under Categories. For the <default config>, set the following parameters:
    • Main Class: ij.ImageJ
    • Working Directory: <your_micromanager_installation_directory>
    • VM options: -Xmx600M (for 64 bit use -Xmx3000M).
  13. Click OK, sacrifice a goat, and then right-click your project and choose Debug.
  14. If the gods are smiling, then Micro-Manager should launch inside ImageJ.

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact