[Nix-dev] Java related problems.

Marc Weber marco-oweber at gmx.de
Sun Feb 15 00:22:15 CET 2009


On Sat, Feb 14, 2009 at 04:33:15PM +0100, Lluís Batlle wrote:
> Hello here,
> 
> using 'dwm' as my window manager (I don't know if it's relevant), two
> java programs don't work well for me, unless using:
> export AWT_TOOLKIT=MToolkit
> 
> The java programs are 'freemind' and 'thinkingrock'.
> 
> I found that someone wrote a wrapper for freemind, which throws away
> the environment for freemind:
> #!/bin/sh
> # using pure env has removed the segfault for me :-)
> exec env -i  sh -c "
> .... etc.
> 
> 'freemind' works well for me without that wrapper, using the
> AWT_TOOLKIT env var (I avoid the wrapper so java gets that var).


> civodul: (irc)
    Hello Nixers!
    MarcWeber (or anyone else): do you use Freemind?
    I get this:
    ERROR:   Your Java virtual machine is neither Sun nor Blackdown,
             =======================================
             FREEMIND WILL MOST PROBABLY *NOT* WORK,
             =======================================
             define JAVACMD, JAVA_BINDIR, JAVA_HOME or PATH in order
             to point to such a VM. See the manpage of freemind(1) for details.
    but presumably, `pkgs.jdk' is Sun's VM, right?
    [...]

That has been the original problem. I won't paste the whole discussion
because I don't think its of much use.

I didn't knew what cause that failure. All I knew was that a lot of env
vars may change the working behaviour of the java application. That's
why I added the wrapper. Probably there is a much better way to do it.
So maybe ask civodul to test your change then :-) (I've notified him
about this thread on irc)

For the java case it's hard to say wether the dervition should enforce a
jre/jdk which must be used or wether the environment implementation
should be used (maybe causing failure)..

If you find a nice policy let me know. Don't think we have a standard
yet.

Marc Weber



More information about the nix-dev mailing list