[tcljava-dev] stdout in jacl
Brought to you by:
mdejong
From: Maurizio De C. <mau...@de...> - 2008-08-07 09:02:56
|
Hallo, this is between a bug report and a question. The context: i am restarting the development of an application called jMax, that is a sound synthesis and processing visual programming language. It is composed by a real time engine written in C, and a graphic development environment written in Java. This part is (almost) fully scriptable in jacl (following the Emacs/Emacs lisp model. The application was originally written at the end of the 90s, run on Java 1.1 and used one of the first version of jacl. I am moving it to the latest Java and to jacl 1.4.1, and i have the following problem. The application include a console, and redirect the Java standard output to this console, using a custom PrintWriter. The problem is that using the latest jacl, the output of puts is not redirected to the new System.out, but go to the original one. Looking at the code, the problem (if it is a problem) is in file StdChannel, where the three variables _in, _out and _err are initialized to System.in, System.out and System.err at class loading time. The class provide some primitives to change them, but in this way standard calls to System.setOut and similar are not honored by jacl. I don't know if this is a design choice or an error, but i suppose that this may be a problem also in other kind of environments, like an application server. Anyway, my case is not critical, but i though reporting this fact may interest the jacl developers. Maurizio De Cecco __________ Maurizio De Cecco - http://maurizio.dececco.name/ |