Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

reading a file from a jar file  RSS feed

 
Felipe Walker
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made a applet I put in a jar file that needs to read a text file outside of the jar file

before I packaged the applet in a jar file the applet read from the text file with no problem but once I put in the jar I keep getting file not found error

the file is in the same directory as the jar file

Please help
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may need to use System.getProperty("user.dir"); to get the current working directory. Be sure to check if it has the value that you expect.

Layne
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!