I have an application which uses threads to run heavy tasks. When the thread ends its own task, it creates a file and sends a message using System.out.println().
In Eclipse works fine, but once compiled into a .jar and called from console, it does not display anything. However it creates correctly the files.
What happends is, when i call the application via console, a new console prompt appears inmediatly, although the program is not finish yet (I know it because no file is being generated yet).
I suspect the problem is how you’re executing the jar file. If you’re just running it from Windows, it’s probably being run with
javaw.exefor example. Simply run it explicitly:and all should be fine. This is unrelated to threads, by the way… it’s just how jar files are executed.