Two Laptop Bag*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Reading files located in runme.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Reading files located in runme.jar" Watch "Reading files located in runme.jar" New topic
Author

Reading files located in runme.jar

Jens E. Thomsen
Greenhorn

Joined: Feb 16, 2007
Posts: 4
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

Joined: Aug 03, 2002
Posts: 7729
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 ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Jens E. Thomsen
Greenhorn

Joined: Feb 16, 2007
Posts: 4
Thanks for the answer. I will have a look at the links you posted.

Jens Erik
 
jQuery in Action, 2nd edition
 
subject: Reading files located in runme.jar
 
Similar Threads
Final Questions
How to check dynamic code downloading ...
Testing that dynamic code download does NOT occur
client and database URLyBird
packaging runme.jar