Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading files located in runme.jar

 
Jens E. Thomsen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have encountered a problem while running my runme.jar file. I have a User Help.txt file that is loaded by the client at startup. The file is loaded correctly when running the application from my IDE, but when I run my runme.jar, then the client can't find the file. I have verified that the file exist in the jar file. I have the same problem with the suncertify.properties file.

Anyone have an idea of what the problem is and how to solve it?

Thanks.

Jens
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps a good read of Roedy Green's notes on Jar files will help answer your question.

Look for Class.getResourceAsStream.
[ February 17, 2007: Message edited by: Barry Gaunt ]
 
Jens E. Thomsen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer. I will have a look at the links you posted.

Jens Erik
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic