From be8667627a060f9e4ee76751f9a703bcde2b3ebe Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Tue, 25 Mar 2014 20:29:42 +0100 Subject: [PATCH] icedtea: Workaround javaws/web plugin start-up error This is a workaround to avoid the error: "java.io.IOException: RSA premaster secret error". In Java Web Start and the Java web plugin, there seems to be a Java policy that prevents untrusted code from being loaded, and (probably for security reasons) it doesn't like the files in the JDK's lib/icedtea/jre/lib/ext directory to be symlinks. Worked around it by copying those files instead of symlinking them. --- pkgs/development/compilers/icedtea/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/icedtea/default.nix b/pkgs/development/compilers/icedtea/default.nix index 42a719d64d35..a8f9617a6340 100644 --- a/pkgs/development/compilers/icedtea/default.nix +++ b/pkgs/development/compilers/icedtea/default.nix @@ -119,6 +119,10 @@ with srcInfo; stdenv.mkDerivation { mkdir $out/lib/icedtea/jre lndir $jre/lib/icedtea/jre $out/lib/icedtea/jre + # The following files cannot be symlinked, as it seems to violate Java security policies + rm $out/lib/icedtea/jre/lib/ext/* + cp $jre/lib/icedtea/jre/lib/ext/* $out/lib/icedtea/jre/lib/ext/ + rm -rf $out/lib/icedtea/jre/bin ln -s $out/lib/icedtea/bin $out/lib/icedtea/jre/bin