On Fri, 15 Mar 2019, Jeroen wrote:

I have installed portable java8 in /context/java, so paths will not be
needed when using absolute paths with the commands in these files. When I
execute the following batch file sample2.bat with a command on a single
line, it will create the sample2.png wordcould file as expected in the
/context/documents folder:

/context/java/bin/java -jar /context/wordcloud/ibm-word-cloud.jar -c
/context/wordcloud/examples/configuration.txt -w 800 -h 600 <
/context/wordcloud/examples/hamlet.txt > /context/documents/sample2.png

I now use this test2.tex file with filter with the defineexternalfilter
command on one line without crlf or spaces:

fonts           > 'fallback modern-designsize rm 12pt' is loaded
t-filter        > current filter : wordcloud
t-filter        > base file : test2-temp-wordcloud-0
t-filter        > input file : test2-temp-wordcloud-0.tmp
t-filter        > output file : test2-temp-wordcloud-0.png
t-filter        > command : /context/java/bin/java -jar
/context/wordcloud/ibm-word-cloud.jar -c
/context/wordcloud/examples/configuration.txt -w 800 -h 600 -o
test2-temp-wordcloud-0.png -i test2-temp-wordcloud-0.tmp
t-filter        > state :
t-filter        > cached output file 'test2-temp-wordcloud-0.png' missing.
Rerunning filter
t-filter        > file 'test2-temp-wordcloud-0.png' cannot be found
t-filter        > current filter : wordcloud
t-filter        > base file : test2-temp-wordcloud-0
t-filter        > input file : test2-temp-wordcloud-0.tmp
t-filter        > output file : test2-temp-wordcloud-0.png

Everything looks okay here, so I am not sure what is going wrong. Can you try if you can run other java programs, perhaps even setting

\usemodule[filter]
\traceexternalfilters
\defineexternalfilter[JAVA][filtercommand=java]

\starttext
\startJAVA
This is a test
\stopJAVA
\stoptext

and check the console output to see if you see messages that java is running (you should see the standard message about how to use java). If java is being called correctly, then the error is on the java end of things and I don't know how to debug that.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to