Hi Keith. Thanks for your reply. >> Any ideas? Relevant technical info below. > Looks like the classical user error of getting the linking order utterly > wrong! (It hasn't arisen recently, but used to come up regularly). This was indeed the problem. Now that I have changed it to: mingw32-gcc -s -o mary.exe \ -I "C:\Program Files (x86)\Java\jdk1.8.0_221\include" \ -I "C:\Program Files (x86)\Java\jdk1.8.0_221\include\win32" \ mary.c \ -L "C:\Program Files (x86)\Java\jdk1.8.0_221\lib" \ -ljvm my application links successfully, and after resolving unrelated problems, started to run too. Thanks. Paul.