Applets 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 file with that statement? How are you giving the applet the permission?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Where is the policy file located? Is it in the correct folder where the Java program looks for it?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
The 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:
System.out.println(System.getProperties().getProperty("user.home"));
The filename must be: .java.policy
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Create a ,java.policy file in that folder.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Yes, That location is where the java program will look for the .java.policy file to use.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Everything must be right or it won't work,
Is the policy correctly named? What is its name?
Is the policy file in the correct location? Where is it located?
How did you create the policy file?
What is the contents of the policy file? Does it have the right code base and permissions granted? Notice the name of the permission in the error message.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Why did you give the file that name? Why do you think the java program will find it?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
How does the java program know the name that you have given the policy file?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
What program reads and uses those lines? What file are they in? How does the program find the policy file? What folders does it look in?
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16