summary refs log tree commit diff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm15
1 files changed, 7 insertions, 8 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index a0b749a4de..ed8c0c777d 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -360,16 +360,15 @@ JNI.")
        (modify-phases %standard-phases
          (delete 'bootstrap)
          (delete 'configure)
-         (replace 'build
+         (add-before 'build 'define-java-environment-variables
            (lambda* (#:key inputs #:allow-other-keys)
+             ;; First, set environment variables (eases debugging on -K).
              (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
-             (setenv "JAVACMD"
-                     (search-input-file inputs "/bin/jamvm"))
-             (setenv "JAVAC"
-                     (search-input-file inputs "/bin/jikes"))
-             (setenv "CLASSPATH"
-                     (search-input-file inputs "/lib/rt.jar"))
-
+             (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
+             (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
+             (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
+         (replace 'build
+           (lambda* (#:key inputs #:allow-other-keys)
              ;; Ant complains if this file doesn't exist.
              (setenv "HOME" "/tmp")
              (with-output-to-file "/tmp/.ant.properties"