Solved

Problem with applet to connect to the server.

Posted on 2003-12-03
12
292 Views
Last Modified: 2012-05-04
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
Comment
Question by:cicurel
12 Comments
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 9871616
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
 
LVL 2

Expert Comment

by:anthony_castillon
ID: 9871919
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
 
LVL 92

Expert Comment

by:objects
ID: 9871927
RMI will have the same problem making the connection.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 9872371
>> 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
 
LVL 92

Expert Comment

by:objects
ID: 9872418
Applets are allowed to connect to the machine they were loaded from.
So there is no security restriction.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 9872465
But they are not even allowed to open files on the same machine too unless they are signed, isn't it?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 92

Expert Comment

by:objects
ID: 9872483
I didn't see any mention of it opening files?
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 9872547
No no.... I was just curious to know.
0
 
LVL 92

Expert Comment

by:objects
ID: 9873370
no they cannot access local files by default.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 9873459
0
 

Author Comment

by:cicurel
ID: 9874113
Thank you very much, you have been a real help.

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

Thanks again.
0
 
LVL 92

Expert Comment

by:objects
ID: 9877078
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now