• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Ranch Hand
Posts: 4632
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic