This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
When a file has been packaged within a JAR, how can you access it using a File or FileInputStream as you cannot specify the path ie. you can't do c:\\somefile.txt as the file in stored within a JAR?
Originally posted by Sreenivasa Majji: Yes. Its possible to keep the 'file' and the .class file in the same .jar file.
This was not what the poster wants to know. He has already said that the file and .class are in the same jar. He wants to read the file from the .class without requiring the path to jar.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.