This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
If your text file is in your applet .jar, then you only need to use a simple file reader to access it. That's what I have done anyway.
is your code generating any error messages? I do not think you are going to be able to write out the file because the path is to the local file system. The applet doesn't know that it is on the same system, so the built in security features are not going to allow it. One way to write a file is to pass the file to a servlet and have the servlet write the file. If you truly want to write a file to the system that is running the applet, you will need to have the applet signed.
Admittedly my experience is limited, so take my input with a grain of salt.
In a web app you need to use absolute paths, because it's not defined what the default directory might be - it differs between servlet containers. The ServletContext.getRealPath method helps translate between web app paths and absolute paths.
Also, if you use the getResourceAsStream mechanism, use absolute paths like "/hs_profile2dist.txt", not "hs_profile2dist.txt".
Ping & DNS - updated with new look and Ping home screen widget