In Mac/Linux, How can I use the command line (in Mac Terminal, say) to send repeated phrases to jconsole, without losing continuity between J sessions?
The help page: http://jsoftware.com/help/user/cmdline.htm explains how to call jconsole, offering these examples: Example 1 $ jconsole -js a=.23 b=.3 "echo a*b" "exit''" Example 2 $ jconsole -js a=.23 b=.3 "echo a*b" These work for me (provided I use a full pathname in place of "jconsole", which avoids a name-clash with an eponymous Java executable.) Example 1 quits jconsole, losing the contents of all locales. Example 2 doesn't quit, but I can't see how to get the command line prompt back again (in place of the J prompt) without quitting jconsole. I want to be able to conduct a command line session something like this: $ jconsole -js a=.23 b=.3 "echo a*b" $ ... $ jconsole -js "echo a+b" ...etc I'm already using a software product (EigenD) which has a Unix executable (brpc) which is used in precisely this way. Can jconsole be used in a similar way? Someone's going to ask me: what am I trying to do? I'll be happy to explain, plus explain why I want to avoid socket programming. But a "yes" to my question avoids me having to go into detail. However there's a silly solution to my problem, which I suppose I ought to mention. It is to leave the J process just as it is, i.e. stateless: $ jconsole -js a=.23 b=.3 "echo a*b" "dump'cache.xml'" "exit''" $ ... $ jconsole -js "reload'cache.xml'" "echo a+b" "dump'cache.xml'" "exit''" This'd probably work fine for small data. But it wouldn't scale. Can we do better than that? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
