This week's book giveaway is in the Java 9 forum. We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line! See this thread for details.
I understand there are limitations on accessing the native file system with MIDP, but will I have problems reading a local text file that I include with my JAR? Thanks, Drew
posted 13 years ago
If it's in the JAR, then it's also in the classpath. you should be able to read the file as a resource (this should work regardless of whether it's in a JAR or not). InputStream stream = getClass().getResoureAsStream("/yourfile.ext"); is one way to open an input stream on the resource.