Java経由でドットネットコンソールアプリケーションを実行しようとしています。
process = Runtime.getRuntime().exec(commandLine);
次の出力が得られます。
Detecting
The handle is invalid.
コンソール(Windows)から直接実行する場合、問題はありません。
Detecting
100%
Done.
100%
このフォームでさらに多くのアプリケーションを実行していますが、問題はありません。
このスタックトレースを取得しました:
Detecting at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at System.Console.get_CursorTop()
at AutomaticImageOrientation.HelperClasses.General.WriteProgressToConsole(Int32 lastIndex, Int32 totalImages)
at AutomaticImageOrientation.MainManager.DetectImage(String[] files, String outputPath, String& globalErrorMessage, Dictionary`2& foundRotations)
問題は、.netアプリがコンソールに書き込もうとしているときです。解決策は何ですか?
問題の原因となっている行が見つかりました:
Console.CursorLeft = 0;
なぜなのかご存知ですか?