[Nix-dev] install4j

Mathijs Kwik mathijs at bluescreen303.nl
Sun Nov 18 01:39:29 CET 2012


Just for completeness, marking this topic as [solved].

It seems the issues I had were not nix-related at all.

The troubles were caused by my window manager XMonad.
Fixed by having xmonad report a different WM as described here:
http://www.haskell.org/haskellwiki/Xmonad/Frequently_asked_questions#Problems_with_Java_applications.2C_Applet_java_console


On Thu, Nov 15, 2012 at 6:00 PM, Mathijs Kwik <mathijs at bluescreen303.nl> wrote:
> On Thu, Nov 15, 2012 at 5:13 PM, Marc Weber <marco-oweber at gmx.de> wrote:
>> Excerpts from Mathijs Kwik's message of Thu Nov 15 16:27:31 +0100 2012:
>>> Hi all,
>>>
>>> Has anyone come across software that is packed/distributed with install4j?
>>> Some software I need distributes itself as a .sh file (with a lot of
>>> binary data appended).
>>> The file extracts itself to some temp dir and wants to start a bundled JRE.
>>> This of course fails on nix, as the bundled JRE tries to load the
>>> wrong runtime loader.
>>
>> Netbeans and the like almost all just worked .. you may want to to have
>> a look at those derivations. My older custom code looks like this:
>> Mabye just gtk is missing and setting LD_LIBRARY_PATH is enough?
>
> It seems not. The problem is: I don't get any errors. I first get a
> small (java-drawn) dialog asking for the language for the
> installation. That dialog works. Continuing opens a new empty grey
> window (no text/buttons/nothing) but nothing happens after that. The
> console does not show any errors about stuff not being found or
> similar problems.
>
> So it appears there is some graphical output issue.
> I tried setting LD_LIBRARY_PATH as you said but that did not change anything.
> I'm not sure which gtk version is expected, and perhaps I need to add
> more gtk-related libs (atk, cairo).
>
>>
>> Also consider using trying with oracle's jdk and openjdk.
>> The latter caused some trouble to some applications for different
>> reasons (allthough I think most should be fixed)
>
> The bundled binary jre is oracle/sun java6, so that's what I'm using too.
>
> All in all, a bit problematic as I don't get any feedback/errors.
> Will try some more though.
>
> Thanks for your help
>
>>
>> Something like this:
>>
>>       netbeansRunner = pkgs.stdenv.mkDerivation {
>>         name = "nix-netbeans-runner-script-${stdenv.system}";
>>
>>         phases = "installPhase";
>>         installPhase = ''
>>           ensureDir $out/bin
>>           target=$out/bin/nix-run-netbeans-${stdenv.system}
>>           cat > $target << EOF
>>           #!/bin/sh
>>           export PATH=${pkgs.jre}/bin:\$PATH
>>           export LD_LIBRARY_PATH=${pkgs.gtkLibs.glib}/lib:${pkgs.gtkLibs.gtk}/lib:${pkgs.xlibs.libXtst}/lib:${pkgs.xlibs.libXt}/lib:${pkgs.xlibs.libXi}/lib
>>           # If you run out of XX space try these? -vmargs -Xms512m -Xmx1024m -showLocation -XX:MaxPermSize=256m
>>           netbeans="\$1"; shift
>>           exec \$netbeans "\$@"
>>           EOF
>>           chmod +x $target
>>           '';
>>
>>         meta = {
>>           description = "provide environment to run Eclipse";
>>           longDescription = ''
>>             Is there one distribution providing support for up to date Eclipse installations?
>>             There are various reasons why not.
>>             Installing binaries just works. Get Eclipse binaries form eclipse.org/downloads
>>             install this wrapper then run Eclipse like this:
>>             nix-run-eclipse $PATH_TO_ECLIPSE/eclipse/eclipse
>>             and be happy. Everything works including update sites.
>>             '';
>>           maintainers = [pkgs.lib.maintainers.marcweber];
>>           platforms = pkgs.lib.platforms.linux;
>>         };
>>       };
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list