That reminds me: on OS X, I sometimes use a shell script like this:

#!/bin/sh
exec /Applications/j64-803/bin/jconsole "$@"

This particular example offers no advantage over a symbolic link, but
if you want variations on a theme, scripts start being nice.

Thanks,

-- 
Raul


On Tue, Mar 3, 2015 at 11:47 PM, Joey K Tuttle <j...@qued.com> wrote:
> Very nice!
>
> I did run into a little frustration in OS X Terminal - where jconsole  is by
> default a tarpit of java stuff. So either the path to jconsole in the J
> bundle, or an alias (I do a symbolic link of ja to be jconsole) removes my
> angst. Examples (in reverse order):
>
> $ ja -js 'echo %. i.2 2x' 'exit 0'
> _3r2 1r2
>    1   0
>
> $ /Applications/j64-803/bin/jconsole -js 'echo %. i.2 2x' 'exit 0'
>
> Where $ is the rightmost character of the command line prompt.
>
> Thank you,
>
> On 2015/03/03 17:10 , Raul Miller wrote:
>>
>> Actually, it occurs to me that there's a simpler approach, which might
>> sometimes be wiser - arrange for standard input to be something other
>> than the keyboard. For example, under unix:
>>
>> :|jconsole -js 'echo 1+1'
>>
>> You'll get a prompt before the exit, but you can avoid that with an
>> explicit exit statement:
>>
>> :|jconsole -js 'echo i.3 3' 'exit 0'
>>
>> Under windows this can be a bit uglier:
>>
>> echo ] >blah.txt
>> jconsole -js 'echo i.3 3' < blah.txt
>>
>> So... why is this a good idea?
>>
>> Well, a problem with using something like "9!:29]1[9!:27 'exit 1'" is
>> that this suppresses the display of any error messages. By instead
>> specifying an empty (or nearly empty) file as standard input, you get
>> to see the error message and stack trace.
>>
>> And you should not care if the display looks a bit messy under error
>> conditions - your real concern should be in alleviating the error.
>>
>> (But if you want an error exit code, you might still want to use some
>> variation on the other approach...)
>>
>> Thanks,
>>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to