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

JFileChooser problem . jar

 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hello,


I have a big problem I made a application everything is fine except when I have created. jar application crashes every time I'm worth using the keyword fileChooser to select an image


Code:


thank you
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Define "crashes". What exactly happens? Do you get an exception? Does the user interface disappear? To make it easier to troubleshoot, run the application from the command line using "java", not "javaw". That way you still see all exception stack traces.
 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I executed the application on the command line using "java"; the appicattion execute without any problem but the picture appears when I use. jar application crashes and I know the problem
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nouf Nassri wrote:the picture appears

Which picture? Please TellTheDetails.

application crashes

So it simply closes down?

I know the problem

That's fine, but you're not really getting it through to the rest of us. I think you're leaving a lot of information out (unintentionally), and we cannot help you like this.
 
Nouf Nassri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm worth when I click on a label appears FileChooser

I then selects an image to display in the label

everything goes well without any problem

but when I turned the application. jar
the traitemenent goes well except when I use and I FileChooser selects an image application crashes
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's about time I ask you for an SSCCE. Nothing too fancy; just the frame, the label, the file chooser, and the entire logic of showing the file chooser and handling its selection.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic