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:

\usemodule[filter]


\defineexternalfilter[wordcloud][filtercommand={/context/java/bin/java -jar /context/wordcloud/ibm-word-cloud.jar -c /context/wordcloud/examples/configuration.txt -w 800 -h 600 -o \externalfilteroutputfile\space -i \externalfilterinputfile}, output=\externalfilterbasefile.png, readcommand=\ExternalFigure, continue=yes, read=yes, cache=yes, purge=no,]


\def\ExternalFigure#1{\externalfigure[#1]}


\traceexternalfilters


\starttext

\startwordcloud

Een bak cijfers vertalen naar een visuele weergave kan ervoor zorgen dat statistische data beter gecommuniceerd wordt. Grafieken zijn zoals Tufte (1997), een bekende auteur op het gebied van analytisch ontwerp, zegt instruments for reasoning. Voordat het zover is zullen echter eerst een paar stappen genomen moeten worden. Ervan uitgaande dat de bak met data al verzameld is moet er gekeken worden welke cijfers met elkaar in verband kunnen worden gebracht. Is er een ontwikkeling in tijd, zijn er verschillen, is er een stijgende of dalende lijn in te ontdekken etcetra. Door deze data te rangschikken en te ordenen kunnen deze patronen zichtbaar gemaakt worden. Ontwikkelingen, schommelingen hierin, de frequentie hiervan, onderlinge relaties en een totaaloverzicht kunnen in beeld gebracht worden.

\stopwordcloud

\stoptext


and the created pdf file states "output file missing", and the following is the test2.log file content:

open source     > level 1, order 1, name 'C:/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          >
system          > ConTeXt  ver: 2018.07.02 14:39 MKIV beta  fmt: 2018.9.28  int: english/english
system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 'C:/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 'C:/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'test2', input './test2', result 'test2'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
system          > synctex functionality is enabled, expect 5-10 pct runtime overhead!
open source     > level 2, order 3, name 'C:/context/documents/test2.tex'
modules         > 'filter' is loaded
open source     > level 3, order 4, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv'
loading         > Filter (ver: 2018.08.10)
modules         > 'module-catcodes' is loaded
open source     > level 4, order 5, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv'
loading         > Module Catcodes (ver: 2018.04.16)
close source    > level 4, order 5, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv'
close source    > level 3, order 5, name 'C:/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv'
fonts           > preloading latin modern fonts (second stage)
fonts           > defining > source file 'D:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf' is not found
fonts           > defining > using source file 'C:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf' due to cache mismatch
fonts           > defining > source file 'D:/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf' is not found
fonts           > defining > using source file 'C:/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf' due to cache mismatch
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
backend         > xmp > using file 'C:/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 5, name 'C:/context/documents/test2.tex'
close source    > level 1, order 5, name 'C:/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          > start used files
system          > text: test2
system          > stop used files
system          > start used files
system          >    1: filename=char-prv.lua filetype=tex format=tex foundname=C:/context/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=C:/context/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=database
system          >    2: filename=cont-yes.mkiv filetype=tex foundname=C:/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv fullname=C:/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv usedmethod=database
system          >    3: filename=publ-imp-default.lua filetype=lua foundname=C:/context/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua fullname=C:/context/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua usedmethod=database
system          >    4: filename=cont-new.mkiv filetype=tex foundname=C:/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv fullname=C:/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv usedmethod=database
system          >    5: filename=lang-exc.lua filetype=lua foundname=C:/context/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua fullname=C:/context/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua usedmethod=database
system          >    6: filename=lang-us.lua filetype=lua foundname=C:/context/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua fullname=C:/context/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua usedmethod=database
system          >    7: filename=C:\context\documents/test2.tex foundname=C:/context/documents/test2.tex fullname=C:/context/documents/test2.tex usedmethod=direct
system          >    8: filename=t-filter.mkiv filetype=tex foundname=C:/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv fullname=C:/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv usedmethod=database
system          >    9: filename=t-module-catcodes.mkiv filetype=tex foundname=C:/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv fullname=C:/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.mkiv usedmethod=database
system          >   10: filename=lm.lfg filetype=tex foundname=C:/context/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg fullname=C:/context/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg usedmethod=database
system          >   11: filename=lmroman12-regular filetype=otf format=otf foundname=C:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf fullname=C:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
system          >   12: filename=lmroman12-regular.otf filetype=opentypefonts foundname=C:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf fullname=C:/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
system          >   13: filename=latinmodern-math.otf filetype=opentypefonts foundname=C:/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf fullname=C:/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
system          >   14: filename=lmmono12-regular filetype=otf format=otf foundname=C:/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf fullname=C:/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf usedmethod=database
system          >   15: filename=lpdf-pdx.xml filetype=tex foundname=C:/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml fullname=C:/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml usedmethod=database
system          > stop used files
system          > start commandline options
system          > currentrun="1"
system          > fulljobname="./test2.tex"
system          > input="./test2.tex"
system          > kindofrun="1"
system          > maxnofruns="9"
system          > no-parse-first-line="true"
system          > synctex="true"
system          > stop commandline options
system          > start commandline files
system          >    1: ./test2.tex
system          > stop commandline files
modules         > start used modules
modules         > loaded : *-filter
modules         > loaded : *-module-catcodes
modules         > stop used modules
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.011 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 15 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 424 modules (0.464 sec), 93 tables (0.030 sec), 517 chunks (0.494 sec)
mkiv lua stats  > traced context: maxstack: 1303, freed: 0, unreachable: 1303
mkiv lua stats  > cleaned up reserved nodes: 59 nodes, 9 lists of 455
mkiv lua stats  > node memory usage: 2 glue, 2 kern, 2 penalty, 11 attribute, 50 glue_spec, 4 attribute_list, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 7 unique task lists, 6 instances (re)created, 34 calls
mkiv lua stats  > synctex tracing: 2 referenced files, 7 files ignored, 3 objects flushed, logfile: test2.synctex
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.003 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 222, file: 776, direct: 8, late: 1, function 601, total: 1608
mkiv lua stats  > randomizer: resumed with value 0.94168090820313
mkiv lua stats  > loaded tex modules: 2 requested, all found (*-filter *-module-catcodes)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > result saved in file: test2.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats  > loaded fonts: 3 files: latinmodern-math.otf, lmmono12-regular.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.103, afm 1.513, tfm 1.000, 8 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.487 seconds
mkiv lua stats  > used platform: win64, type: windows, binary subtree: texmf-win64
mkiv lua stats  > used engine: luatex version 1.09 with functionality level 6930, banner: this is luatex, version 1.09.0 (tex live 2018/w32tex)
mkiv lua stats  > control sequences: 45247 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 100 MB (ctx: 100 MB), hash type: lua, hash chars: min(32,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 1.472 seconds, 1 processed pages, 1 shipped pages, 0.679 pages/second