Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Self-executing JAR Date: Mon, 16 Apr 2012 14:51:24 -0700 Organization: A noiseless patient Spider Lines: 59 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 16 Apr 2012 21:51:26 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="QNqT5u6Ryx/DB+LpnoCWdQ"; logging-data="24473"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190MtkGq+UHn46Eun9IN2JPujSILUexrfM=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 In-Reply-To: Cancel-Lock: sha1:lKsIy6ACvh7RynK9S/8AvtvdYYI= Xref: csiph.com comp.lang.java.programmer:13595 On 4/16/2012 1:34 PM, Tim Slattery wrote: > I export "Main.jar". To invoke from the command line, I type > "Main.jar". Nothing but a command prompt. I have jedit installed. If I > go to its directory and type "jedit.jar", it jumps right up. Therefore > I assume that the JRE can be found. OK, I tried it and I get the same behavior. BTW, this is what I mean when I ask "show us the command line": C:\Users\Brenden\Dev\proj\hw\dist>hw.jar C:\Users\Brenden\Dev\proj\hw\dist>java -jar hw.jar Hello world! C:\Users\Brenden\Dev\proj\hw\dist> That's cut-and-paste directly from my window on my computer. It's easy to do, saves typing, and most importantly avoids typos when you're trying to ask a technical question. Learn how to do it (use Google). So I tried it with a new GUI app I made (just shows a dialog box with "Hello World!") and that displays the dialog, but there's still no console output. So I'm sure I have the file association set, and further I'm still seeing the same behavior as you. I'm guessing this is Microsoft interacting poorly with other vendors' products, and leave it at that. File a bug report if you believe that will help. Meanwhile, just use the "java -jar" command like I did above. For others who might like to test this, here is the GUI test version: package hwgui; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; /** * * @author Brenden */ public class Hwgui { public static void main( String[] args ) { SwingUtilities.invokeLater( new Runnable() { public void run() { JOptionPane.showMessageDialog( null, "Hello World!"); } } ); System.out.println( "Hello World!" ); } }