hi all
i have applet that i want to connect to the server when i run the applet from the appletviewer the applet connect to the server ,but when i run the applet from web browser i have the following exception
java.security.AccessControlException: access denied ("java.net.SocketPermission" "127.0.0.1:3000" "connect,resolve")
even i give the applet the folllowing permission
grant{
permission java.security.SocketPermission "127.0.0.1:3000" "connect,accept,listen,resolve";
};
lena1990
-3
Junior Poster in Training
Recommended Answers
Jump to PostApplets are restricted in what they can do. They need permission to connect to a site if they were not loaded from that site. Are you loading the html with the applet from a server at 127.0.0.1?
i give the applet the folllowing permission
Where is the policy …
Jump to PostWhere is the policy file located? Is it in the correct folder where the Java program looks for it?
Jump to PostThe java program looks in the user.home directory for the .java.policy file. There are ways to tell it to look in other locations. I don't know how to do it for the java plugin running in a browser. Execute this statement in a test program to find the user.home folder:
…
Jump to PostCreate a ,java.policy file in that folder.
Jump to PostYes, That location is where the java program will look for the .java.policy file to use.
All 24 Replies
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
NormR1
563
Posting Sage
Team Colleague
lena1990
-3
Junior Poster in Training
stephen84s
550
Nearly a Posting Virtuoso
Featured Poster
NormR1
563
Posting Sage
Team Colleague
Darryl.Burke
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.