Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JAR File issue

Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exporting a project into a JAR file hasn't been working for me. Program runs fine in Eclipse. However if I export it into a Runnable OR a standard JAR file. They won't run past the first window. I have 3 Gui's. A Begin one, disposes than opens the next window upon certain commands, and the third window after that. After the first window, nothing happens as if the program just quit or had an error. I created a manifest, included all pictures in the exporting. Any help?
Posts: 26971
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably your code assumes that the pictures are in the current working directory, or something like that. But now they are in the jar, is that right? Putting them in the jar is totally the right thing to do, but then you have to read them as resources.

I believe that if you run the jar via the "java -jar YourJar.jar" command then you'll get a console where the stack traces should appear when an uncaught exception occurs.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic