John Kirksey wrote:

Is it possible to access a web service from an applet? I am a part time
Information Systems student, and I want to have an applet that connects
to a stock quote service (among other things)....

java.security.AccessControlException: access denied
(java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
If you're not at all concerned about security, you can probably get it
to work by putting your applet jar in your lib/ext directory, which by
default gives it AllPermissions. Note that you may have more than one
lib/ext directory, e.g. one for the JDK and one for the JRE; for play
purposes it may be easier to drop it into all than figure out which
is being used by the browser, but if you're using the Java Plug-In
it's not hard. (On Windows: Start/Settings/Control Panel/Java Plug-In,
click Advanced tab, choose a specific "Java Runtime Environment".)
  If you are concerned about security, then the problem with this
solution is that you may then also need to move other jars into the
same directory, e.g. soap.jar and so forth; if they are "below" your
applet's own jar in the classloader hierarchy, then they won't be
seen even though they are on the classpath. Life is difficult; do
you want to give these guys AllPermissions? You can't write a
distributable app that way unless everybody you distribute it to
trusts you completely...but it may be what you want, for now.

Tom Myers



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to