<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 12/16/2013 01:47 PM, Martin Weiser
      wrote:<br>
    </div>
    <blockquote
      cite="mid:1387198079.11087.21.camel@zouzel.natur.cuni.cz"
      type="cite">
      <pre wrap="">Andreas Tille píše v Po 16. 12. 2013 v 13:33 +0100:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi Martin,

On Mon, Dec 16, 2013 at 12:55:33PM +0100, Martin Weiser wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Dear friends,

maybe there is something else involved (should I open another bug?), as
Olivier's workaround helps only partially:

me@here:~$ export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386
me@here:~$ echo $JAVA_HOME
/usr/lib/jvm/java-1.7.0-openjdk-i386
me@here:~$ imagej
Open other images in this ImageJ panel as follows:
  imagej -p 1 <image1> [<image2> ... <imageN>]

Exception in thread "main" java.awt.HeadlessException
        at
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
        at java.awt.Window.<init>(Window.java:535)
        at java.awt.Frame.<init>(Frame.java:420)
        at ij.ImageJ.<init>(ImageJ.java:129)
        at ij.ImageJ.main(ImageJ.java:597)

Any advice?
Once again: thank you for your patience.
</pre>
        </blockquote>
      </blockquote>
    </blockquote>
    You may be running an application that requires a graphical mode in
    non graphical environment.<br>
    There is an option in java to run in headless mode  (when no
    graphics are available):<br>
    <big><br>
    </big>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <pre style="margin: 0px; padding: 0px; list-style: none; -webkit-font-smoothing: antialiased; color: rgb(0, 0, 0); font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"><big>java -Djava.awt.headless=true

Please update the imagej script to try this.</big>
</pre>
    <br>
    this however only works when original code manage this correctly.<br>
    <br>
    Olivier<br>
    <blockquote
      cite="mid:1387198079.11087.21.camel@zouzel.natur.cuni.cz"
      type="cite">
      <blockquote type="cite">
        <pre wrap="">
Please try the script:

  <a class="moz-txt-link-freetext" href="http://anonscm.debian.org/viewvc/debian-med/trunk/packages/imagej/trunk/debian/imagej.sh?view=markup">http://anonscm.debian.org/viewvc/debian-med/trunk/packages/imagej/trunk/debian/imagej.sh?view=markup</a>

which is the usual wrapper around imagej with a patch that should properly
select the JAVA_HOME. 

It would be nice to know whether this would help or not.

Kind regards

        Andreas.

</pre>
      </blockquote>
      <pre wrap="">
Hi Andreas,

unfortunately, the same behaviour occurs:

louskacek@zouzel:~$ chmod 777 imagej.sh
louskacek@zouzel:~$ ./imagej.sh
Open other images in this ImageJ panel as follows:
  imagej -p 1 <image1> [<image2> ... <imageN>]

Exception in thread "main" java.awt.HeadlessException
        at
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
        at java.awt.Window.<init>(Window.java:535)
        at java.awt.Frame.<init>(Frame.java:420)
        at ij.ImageJ.<init>(ImageJ.java:129)
        at ij.ImageJ.main(ImageJ.java:597)

Any advice?
Best,
Martin.

</pre>
      <br>
      <pre class="moz-signature" cols="72">-- 
gpg key id: 4096R/326D8438  (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335  D26D 78DC 68DB 326D 8438</pre>
    </blockquote>
  </body>
</html>