OK, problem solved. I had it in my head that SPOJ was doing something to compile the submitted code to a class file which was then loaded and that this would execute the 'main' function automatically.
This turns out to be incorrect.
What I was missing was a separate line (form, in Lisp/Clojure terms) which invoked 'main' after it was defined; e.g.
(main)
That's all it took. I discovered this when I went back and reviewed the code I'd originally found - it had the separate invocation of main
but I'd managed to miss it when I copied the code.
So, a little misunderstanding on my part led to a couple of wasted days and a fair amount of frustration. Well, I'm only 58 - maybe when I'm all grown up I'll understand this stuff better.
Oh, that's right - I'm already all grown up - guess I won't... 