This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pop-up frames display for a few seconds when i run my programs outside the IDE

 
Arhyal gyel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers!!!
I really need your help on this. When i ever i write a program and run it outside the IDE (i use netbeans 6.9.1), the program runs perfectly, but when i install JDK 6 or 7 on a pc that did not previously have java and run my program, the pop-up frames such as JFileChooser or JOptionPane only show for a couple of seconds (approximately 7 to 9 seconds) then they close themselves and choose the default option without any user input.
I need y'all to help me out or give me suggestions on what to do or what i'm doing wrongly.
NB: I use 'javaw.exe' under the '/bin' directory of the JRE to execute the program since the 'java.exe' only brings out a console for2 seconds then does nothing.
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the errant behavior on the other machine.

Note that the first 'S' stands for Short. We don't want to see all your code.
 
Arhyal gyel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically any code that pops-up a JOptionPane or a JFileChooser will only run for a couple of seconds instead of waiting for user input(that is when i run my program outside the IDE on a separate machine).
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically you're the only person with that problem.

You would need to prove how it happens
by posting a short sample program we can
run and see it happening.
 
Arhyal gyel
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, here is a sample code that when built(by the NetBeans IDE) and run outside the IDE on another system (on which i've already installed JDK 7), will only show the JOptionPane for roughly 7 to 9 seconds then disappear without waiting for user input.


This code works correctly in the IDE, and when i build it and run it outside the IDE, but when i try to run it on another system (outside the IDE), the pop-up keeps disappearing after a few seconds without user input.
I.ve tried it on more than one system.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> Ok, here is a sample code that when built(by the NetBeans IDE)

rubbish

> This code works correctly in the IDE,

more rubbish


so, where's the 'n'

all you've done is typed some guesswork here.

stop wasting everyone's time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic