FAQ: Why do I get an exception when running MIPAV via X11 forwarding on Linux? and Histogram Cumulative: Difference between pages

From MIPAV
(Difference between pages)
Jump to navigation Jump to search
MIPAV>Mccreedy
(Created page with "=== Question: === When I try to run MIPAV via X11 forwarding on a remote Linux system, I get the exception below when opening some dialogs. <pre> Exception in thread "AWT-Event...")
 
MIPAV>Olga Vovk
 
Line 1: Line 1:
=== Question: ===
Main article [[Cumulative Histogram]]


When I try to run MIPAV via X11 forwarding on a remote Linux system, I get the exception below when opening some dialogs.
== See also:==


<pre>
*[[Histogram Equalization: Regional Adaptive]]
Exception in thread "AWT-EventQueue-0" sun.awt.X11.XException: Cannot write XdndAware property
*[[Histogram Equalization: Neighborhood Adaptive]]
      at sun.awt.X11.XDnDDropTargetProtocol.registerDropTarget(XDnDDropTargetProtocol.java:79)
*[[Histogram Matching]]
      at sun.awt.X11.XDropTargetRegistry.registerDropSite(XDropTargetRegistry.java:554)
*[[2D Histogram]]
      at sun.awt.X11.XWindowPeer.addDropTarget(XWindowPeer.java:1633)
      at sun.awt.X11.XComponentPeer.addDropTarget(XComponentPeer.java:1509)
      at java.awt.dnd.DropTarget.addNotify(DropTarget.java:493)
      at java.awt.Component.addNotify(Component.java:6687)
      at java.awt.Container.addNotify(Container.java:2567)
      at javax.swing.JComponent.addNotify(JComponent.java:4685)
[..snip..]
</pre>


=== Answer: ===
[[Category:Help]]
 
[[Category:Help:Algorithms]]
This exception is due to an incompatibility between Java and the X11 forwarding client.  Adding "-DsuppressSwingDropSupport=true" (without the quotes) to the VM arguments circumvents the problem.  To add this to MIPAV's startup, go to the installation directory of MIPAV on the remote computer and open the file mipav.lax in your favorite editor.
 
Find the section that looks like:
 
<pre>
#  LAX.NL.JAVA.OPTION.ADDITIONAL
#  -----------------------------
#  Runtime server switch to force java to run as:
#  java -server MipavMain  etc, etc, etc
 
lax.nl.java.option.additional=-server
</pre>
 
And change it to:
 
<pre>
#  LAX.NL.JAVA.OPTION.ADDITIONAL
#  -----------------------------
#  Runtime server switch to force java to run as:
#  java -server MipavMain  etc, etc, etc
 
lax.nl.java.option.additional=-server -DsuppressSwingDropSupport=true
</pre>
 
The next time you run MIPAV, you should not encounter the same issue.

Revision as of 15:13, 7 August 2012