Forums > Java

cpost or equivalent

September 13, 2006 | 4:42 pm

Hi,

Is there an equivalent of the cpost method which is available in Max
C API or in JavaScript?

Best,
ej


September 13, 2006 | 7:36 pm

Hi Emmanual,
There is no equivalent for cpost. However, if you put this code in a
static block
at the top of your class you can use System.out.println and
System.err.println to log to the console.
By default these are redirected to the max console. In essence, this
code undoes that.

static{

System.setErr(new PrintStream(new FileOutputStream
(FileDescriptor.err)));
System.setOut(new PrintStream(new FileOutputStream
(FileDescriptor.out)));
}

Topher

On Sep 13, 2006, at 09:42 AM, Emmanuel Jourdan wrote:

> Hi,
>
> Is there an equivalent of the cpost method which is available in
> Max C API or in JavaScript?
>
> Best,
> ej
>
>


September 13, 2006 | 7:37 pm

Hi Emmanual,
There is no equivalent for cpost. However, if you put this code in a
static block
at the top of your class you can use System.out.println and
System.err.println to log to the console.
By default these are redirected to the max console. In essence, this
code undoes that.

static{

System.setErr(new PrintStream(new FileOutputStream
(FileDescriptor.err)));
System.setOut(new PrintStream(new FileOutputStream
(FileDescriptor.out)));
}

Topher

On Sep 13, 2006, at 09:42 AM, Emmanuel Jourdan wrote:

> Hi,
>
> Is there an equivalent of the cpost method which is available in
> Max C API or in JavaScript?
>
> Best,
> ej
>
>


Viewing 3 posts - 1 through 3 (of 3 total)