Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with applet to connect to the server.

Posted on 2003-12-03
12
Medium Priority
?
298 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 92

Accepted Solution

by:
objects earned 1000 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

721 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