emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] java source block snippets


From: Brad Knotwell
Subject: [O] java source block snippets
Date: Thu, 20 Dec 2018 08:02:25 +0000 (UTC)

Hello all--

I was trying to do a java source block and I got hello world working trivially.  I then tried to move forward but I can't figure out how to get a java source block to accept input from org.

The following worked fine in C and allowed me to test the performance of a sha1 hash implementation:  

#+BEGIN_SRC C :var indata=cleandata  :exports both :results output :tangle t.c :includes '("<stdio.h>" "<string.h>" "<unistd.h>" "<sys/time.h>" "<openssl/ssl.h>" "<openssl/sha.h>") :libs -L /usr/local/Cellar/openssl/1.0.2q/lib -lcrypto

while I know the compilation method's nowhere near the same, I would've expected something like the following to work: 

#+BEGIN_SRC java :results output :export both :var indata=cleandata :var x="hi" :tangle t.java

Looking at the tangled file, it's clear the :var header arguments are ignored.  Since I have the data in an appendix, I can write some code to put cleandata in a file and read it directly but I was hoping there was a more consistent babel way to handle it.

Thx.

--Brad

reply via email to

[Prev in Thread] Current Thread [Next in Thread]