• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jarring Problem. Please Help !  RSS feed

 
K. Sushant
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed an application involving internal frames and database connection. The class files are kept in the rot directory while the images required as icons are placed in the 'images' folder inside the root directory.
But when I created a jar file of the application, the application wouldn't procced ahead of the main class.
Why is this so ?
Is the 'images' folder required in the jar or not ?
Please help !
Thank You
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes images can be put in the jar file. And it can be accessed like this
URL url = getClass().getResource("/images/abc.gif");
now this URL can be used to get the image.
Hope this helps you.
Sanjeev Kaushik
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!