Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

Problem with applet to connect to the server.

Hi.

I have created an application that is running on my computer, and i wanted to create an applet to connect to it and i will be able to view the program information from any computer on the net.

but i have got a problem i keep receiving:
java.security.AccessControlException access denied java.net.SocketPermission

and it is not connecting to the program.
i know that java can connect only to the server on the same computer.
and i dont want to change the java.policy in the J2RE for every computer trying to view the info.

And it is a program i created so i would not like to perchuse a certificate for it.

Any idea how to solve this problem?
i hope i made myself clear with my question.
0
cicurel
Asked:
cicurel
1 Solution
 
objectsCommented:
you can sign your applet with a test certificate.
http://personal.vsnl.com/sureshms/javasign1.html

Or run your server on the same box as the applet is being loaded from.

Or use an application instead of an applet.
0
 
anthony_castillonCommented:
Why not use RMI to invoke your application residing in the separate computer?  The J2EE tutorial in java.sun.com should be able to help you.
0
 
objectsCommented:
RMI will have the same problem making the connection.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Mayank SAssociate Director - Product EngineeringCommented:
>> Or run your server on the same box as the applet is being loaded from.

Mick, can you please comment a little more on that. Also, how does that help in removing the security restrictions?
0
 
objectsCommented:
Applets are allowed to connect to the machine they were loaded from.
So there is no security restriction.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
But they are not even allowed to open files on the same machine too unless they are signed, isn't it?
0
 
objectsCommented:
I didn't see any mention of it opening files?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
No no.... I was just curious to know.
0
 
objectsCommented:
no they cannot access local files by default.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
0
 
cicurelAuthor Commented:
Thank you very much, you have been a real help.

I have created a test certificate and it works just fine.

Thanks again.
0
 
objectsCommented:
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now