Skip to main content
gamedev.net
🔒 Locked

[java] Setting applet permissions

Started by FlaiseSaffron Oct 4, 2008 at 11:31 PM 0 replies 650+ views
Original Post
FlaiseSaffron
FlaiseSaffron
I am in the middle of programming a game that uses a client/server network structure, and to make things simple for the players, I am attempting to build a web page with an applet that will serve as the client program. The trouble I'm running into is that when my applet attempts to read the configuration file that is in the same directory as the applet itself, a security exception is raised. I thought that applets were allowed to access files in their own directory, so if they are, can you tell me the best way to do so? Also, I need the applet to open a socket connection to the game server, which is on a machine separate from the web server. I know signing the applet will prevent this from causing a security exception, but since I cannot do this with a verified security certificate (seeing as those cost a lot of money) the user's browser will display a warning every time they load the page. Can I get around this security exception in a way that won't display a warning to the user? Thanks in advance for any help you can provide.
ractoc
ractoc
Have you tried creating your own certificate?
If I remember correctly, this will cause a popup once, asking the user if they trust the person that issued the certificate. If they say yes there, they shouldn't get the message again.

As for the config file, this may have something to do with the codebase in your applet tag. Is it not possible to put the config file inside the applet jar?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.