Problem with applet, between appletviewer and browser
Well I made an applet which lets a user log in and do some stuff, it simulates a bank, they can transfer money if they are clients, withdraw or deposit if they are cashiers, watch info if they are the guys who call to make you pay debts, and an administrator.
It works with files.
I have tried it with AppletViewer, and it works perfectly, but... when I try it in a browser it has troubles.
My guess is that I need to do something different to read files, like getting the URL of the file instead of putting "users.dat" as path to the constructor of FileInputStream
So, is my guess right? or you think there may be another possibility?
If so, I remembered there was a way to get the URL of the running applet, but i don't remember where i read it and i can't find it :s
supposing its something like "getURL()"
would I have to put FileInputStream(getURL().toString()+"users.dat") ??
or how should I use it?