Campbell Ritchie wrote:A jar is usually opened with a program called javaw which does not open a console or terminal.
Oh ok that makes sense. So I guess the fix is simpler then I thought, you just have to tell windows to open it with java.exe instead of javaw.exe.
Thanks!
Edit: here is how I finally got around this problem if anyone else is interested (this is all in windows).
Since I didn't want all jar files to be opened with java.exe (who wants a console popping up when you have a flashy gui?), I just added a right click option to jar files that says "open in console" and causes the jar file to be opened with java.exe. I did this by just quickly going in to the registry;
click here for more info.
If you don't care about having the console popping up every time you double click a jar file, you can use the following in cmd.exe to make jar files open with java.exe:
ftype jarfile=java.exe -jar "%1"
(this is assuming you have your classpath set already and jarfile is already associated with .jar. google classpath, assoc, and ftype for more info.)
Hope this helps someone.