From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brad Knotwell Subject: java source block snippets Date: Thu, 20 Dec 2018 08:02:25 +0000 (UTC) Message-ID: <1333119044.599677.1545292945934@mail.yahoo.com> References: <1333119044.599677.1545292945934.ref@mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_599676_99719840.1545292945933" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZtIG-0002Cf-OO for emacs-orgmode@gnu.org; Thu, 20 Dec 2018 03:02:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZtIC-0000tY-QP for emacs-orgmode@gnu.org; Thu, 20 Dec 2018 03:02:56 -0500 Received: from sonic306-20.consmr.mail.ne1.yahoo.com ([66.163.189.82]:60628) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZtIC-0000sU-DM for emacs-orgmode@gnu.org; Thu, 20 Dec 2018 03:02:52 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org-mode ------=_Part_599676_99719840.1545292945933 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello all-- I was trying to do a java source block and I got hello world working trivia= lly. =C2=A0I 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: =C2=A0 #+BEGIN_SRC C :var indata=3Dcleandata=C2=A0 :exports both :results output := tangle t.c :includes '("" "" "" ""= "" "") :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 exp= ected something like the following to work:=C2=A0 #+BEGIN_SRC java :results output :export both :var indata=3Dcleandata :var = x=3D"hi" :tangle t.java Looking at the tangled file, it's clear the :var header arguments are ignor= ed. =C2=A0Since I have the data in an appendix, I can write some code to pu= t cleandata in a file and read it directly but I was hoping there was a mor= e consistent babel way to handle it. Thx. --Brad ------=_Part_599676_99719840.1545292945933 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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= =3Dcleandata  :exports both :results output :tangle t.c :includes '("&= lt;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 :v= ar indata=3Dcleandata :var x=3D"hi" :tangle t.java

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

Thx.

--Brad
------=_Part_599676_99719840.1545292945933--