Hi, I need to read the properties file in Applet. Is it possible to read the properties file if it is present within the jar (where applet is present)?? Thanks
Regards<br />Arun Kumar BS
posted 14 years ago
hi Arun, it is possible to read files from the Jar file u specify in ARCHIVE attribute of the APPLET tag. say u have a property file called property.txt in a Jar file and u won read it in the applet u can do something like this in ur applet,
here i have assumed that we have applet tag having parameter named "propFile" that contains name of the property file. this is just for little flexibility. u can hardcode the property file name in the applet code as well. also have a look here which was the primary resource of my code as well... btw, S.o.p is System.out.println (just in case u don get it!) and that will not print anything on the applet but it will be there in the Java Console of the browser regards maulin
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads