Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Text file not being found when running JAR file

801931Dec 23 2008 — edited Dec 26 2008
Hi.
I have a project which reads from a .txt file. When I run it from Netbeans it works fine but when I JAR the project (and the text file is within the JAR file because when I extracted it, it was there) it complains that it doesn't the text file. On the other hand, when I place the text file in the same folder as the JAR file resides, then the JAR files works... but I don't want this. I want it to run from the JAR file only.
Any help?
Thanks and regards,
Krt_Malta
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 23 2009
Added on Dec 23 2008
14 comments
1,088 views