File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading files located in runme.jar

 
Jens E. Thomsen
Greenhorn
Posts: 4
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic