The problem was reported in

I reproduced the problem locally. The basic error message is

  Caught: java.lang.ClassFormatError: Illegal class name 

The problem is the dash.

The patch replaces dashes with underscores when constructing temp file


>From a4b64486c8f527b04ae915dcc45a3a2ec43d8e62 Mon Sep 17 00:00:00 2001
From: Nick Dokos <>
Date: Fri, 23 Feb 2018 17:58:27 -0500
Subject: [PATCH] Replace dash by underscore in temp file names.

* org-babel-groovy-evaluate: replace '-' by '_' in temp file names.

Apparently, the JVM uses file names in the construction of names of internal
objects and dashes are illegal in that context. See

for an example.
 lisp/ob-groovy.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-groovy.el b/lisp/ob-groovy.el
index 67e7562fb..565b09754 100644
--- a/lisp/ob-groovy.el
+++ b/lisp/ob-groovy.el
@@ -84,12 +84,12 @@ in BODY as elisp."
   (when session (error "Sessions are not (yet) supported for Groovy"))
   (pcase result-type
-     (let ((src-file (org-babel-temp-file "groovy-")))
+     (let ((src-file (org-babel-temp-file "groovy_")))
        (progn (with-temp-file src-file (insert body))
                (concat org-babel-groovy-command " " src-file) ""))))
-     (let* ((src-file (org-babel-temp-file "groovy-"))
+     (let* ((src-file (org-babel-temp-file "groovy_"))
             (wrapper (format org-babel-groovy-wrapper-method body)))
        (with-temp-file src-file (insert wrapper))
        (let ((raw (org-babel-eval

Reply via email to