Rob Prime wrote:Only through reflection, and only if the security manager allows it. In general, it's a case of bad design - either by the person that created the class for not providing getters / setters or by you for trying to access something you really shouldn't. (Usually it's the former.)
Campbell Ritchie wrote:A jar is usually opened with a program called javaw which does not open a console or terminal.
A JAR is a great way of packaging and deploying a Java SE project. But there is a problem with console input/output--the standard I/O files (System.out, System.err, and System.in) do not work when a JAR is activated by a double-click. System.out and System.err are simple, intuitive, and frequently used for problem reporting, and their loss can be quite inconvenient.
http://today.java.net/article/2006/01/27/console-terminal-jars