Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
を使用する C で DLL を作成しましたprintf。JNAを使用して、Javaのラッパーにこのdllを使用しています。
printf
問題は、printf データが Java アプリの最後にしか表示されないことです。
だから私は System.out.flush(); を使用しようとしました。しかし、それは効果がありません。
正常かどうか、解決方法を教えてください。
fflush(stdout);の後に追加しprintfて、バッファを強制的にフラッシュします。
fflush(stdout);