Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Reading A file from an Applet

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am tring to write a ticker applet that will display prices of certain stocks. I have created an application that writes the symbols and prices to a text file stored in the same directory as the applet class. How can a setup the applet to read the data from the file???
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
After you have coded the applet to read the file, you will need to sign it because reading files from an applet is playing outside the sandbox.
This link might help you:

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I loaded java propery object reading a server side properties is the code.
appletCommands = new Hashtable();
AppletController controller = (AppletController) AppletReferences.getApplet(AppletConstants.APPLET_CONTROLLER);
String path = controller.getCodeBase().toString();
path = path + "";
URL url = new URL(path);
Properties prop = new Properties();

Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic