Kinda baffled by the following case.
I'm running the Kt client, that's setup to fail on a missing Mod-client-specific UI-res file. (triggering a terminal error on character login, or when entering the "new character" part.)
(PS: I remember I'm not sure if its a Kt or Ender client UI-res file here. == Just data - minor. +Is Ender specific UI-res file btw. ... )
Now ... when running the following batch file with the "java %[HHCMD]%" line enabled. There is a error message displayed in the console window.
But ... when trying to redirect that error message to a file. The error message never makes it to the file.
- Error messages that are passed in the stderr stream do work normally, and they can be captured.
- Initially tried AutoIt for the stream data capture, but that failed on this case to - for the same (unknown to me) reason I imagine.
???
- Is there anything about Java streams that could account for this odd stdout(?) stream behavior ?
- Is there a workaround for this ? (none Java workaround preferred.)
- Anything else I might be missing, not seeing, etc ...

Edit: Erm. Tested the same case directly on the Ender client, and the target error/message is now in the stderr stream. ... Which is interesting, but its not solving/explaining the problem in relation to the Kt client case to me yet.

- Code: Select all
@echo on
@echo off
:: -- Settings --
::
set [ErrorConsole]=1
:: ErrorConsole: 1 (Start with console window to show client errors, if any.)
:: ErrorConsole: 0 (No console windows.)
::
set [HHCMD]=-Xms256m -Xmx512m -jar kthaven.jar moltke.seatribe.se
if "%[ErrorConsole]%"=="1" (
REM ~ java %[HHCMD]%
rem | java error message displayed in console window.
REM ~ java %[HHCMD]% 2>log2.tmp
rem | no text in redirect file.
rem | error text is displayed in console. ... ERGO: message is not passed on stderr stream.
@echo on
echo (start) 1>log1.tmp
java %[HHCMD]% 1>>log1.tmp
echo (end) 1>>log1.tmp
rem | no text in redirect file. OTHER than the (start) and (end) echo's
rem | no java error text displayed in console window either.
echo ERRORLEVEL=%ERRORLEVEL%
pause
) else (
start javaw %[HHCMD]%
)