org babel and java classpath

In org mode using java code blocks I wanted to add some jars to the classpath. Looking at the code of org-babel-execute:java there are two different header arguments: cmpflag when compiling and cmdline when executing. Simply set the two vars (they are nil by default) to the correct value.

(setq org-babel-default-header-args:java
      '((:cmpflag . "-cp .:myjar1.jar:myjar2.jar")
        (:cmdline . "-cp .:myjar1.jar:myjar2.jar")))

This is for org version

8.3.2

Date: 2015-12-08

Created: 2015-12-08 Di 23:21

Validate