Solved

Problem with applet to connect to the server.

Posted on 2003-12-03
12
291 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:mayankeagle
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:mayankeagle
ID: 9872465
But they are not even allowed to open files on the same machine too unless they are signed, isn't it?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 92

Expert Comment

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

Expert Comment

by:mayankeagle
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:mayankeagle
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

744 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

9 Experts available now in Live!

Get 1:1 Help Now