Java Console Console

They noticed that no one had answered this yet, so I thought that I would give him a chance again. Hope someone can help. Already went to study in Java, and he just said that I messed up something and could not understand, so I can not move on.

Anywho, here is my test code:

import javax.swing.JOptionPane; public class Test { public static void main(String[] args) { System.out.println("hello"); JOptionPane.showInputDialog("Enter a real number"); } } 

And here is what I get in the console:

 hello 

03:30.28 1[dbg] In DllGetClassObject
03:30.28 2[dbg] CShellExtClassFactory::CShellExtClassFactory()
03:30.28 3[dbg] CShellExtClassFactory::QueryInterface()
03:30.28 4[dbg] CShellExtClassFactory::CreateInstance()
03:30.28 5[dbg] CShellExt::CShellExt()
03:30.28 6[dbg] Looping before Zumo is running
03:30.28 7[dbg] CShellExt::QueryInterface()==>IID_IShellIconOverlayIdentifier
03:30.28 8[dbg] CShellExt::AddRef()
03:30.28 9[dbg] CShellExt::AddRef()
03:30.28 10[dbg] CShellExt::Release()
03:30.28 11[dbg] CShellExt::QueryInterface()==>IID_IShellIconOverlayIdentifier
03:30.28 12[dbg] CShellExt::AddRef()
03:30.28 13[dbg] CShellExt::Release()
03:30.28 14[dbg] Entering CShellExt::GetOverlayInfo
03:30.28 15[dbg] Icon path: C:\Program Files (x86)\Hewlett-Packard\HP CloudDrive\icons\deflated.ico
03:30.28 16[dbg] Exiting CShellExt::GetOverlayInfo successfully.

Any help would be greatly appreciated. I already tried reinstalling everything I could, including eclipse and JDK 1.7. I also noticed that this only happens when I try to use the JOptionPane dialog. I am using Windows 7 system.

Thanks guys,

+4
source share
2 answers

Just guess, because I ran into strange AWT / Swing issues on other systems, you can try this here (sometimes the basic user interface system does not initialize properly, but as I said, this is just a guess):

 public class Test { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { System.out.println("hello"); JOptionPane.showInputDialog("Enter a real number"); } }); } } 

Using invokeLater , you force the initialization of the entire user interface system (launch EDT and the parameter bar from within the EDT), I had to use this trick, for example. so that my SDL bindings under OSX work. invokeLater initializes the entire Cocoa system for me.

+3
source

This happened to me when JTextField or JTextArea was shown in my program. This only happened when compiling and running in Java 7 or higher, but not in Java 6.

I do not know why this happened, but the removal of the HP CloudDrive, which was pre-installed on my HP laptop, stopped all these lines.

0
source

All Articles