Solved

Why can't the client receive the message from the server in UDP programing by applet?

Posted on 2001-06-28
11
204 Views
Last Modified: 2013-12-29
I have meet a problem following that recentainly:  
  Why can't the client receive the message from the server in UDP programing When I use applet and frame?
  There are the following error in java control:
/************************************************/
com.ms.security.SecurityExceptionEx[JIMMessage.feedback]: cannot access 8000
   at com/ms/security/permissions/NetIOPermission.check
   at com/ms/security/PolicyEngine.deepCheck
   at com/ms/security/PolicyEngine.checkPermission
   at com/ms/security/StandardSecurityManager.chk
   at com/ms/security/StandardSecurityManager.checkListen
   at java/net/DatagramSocket.create
   at java/net/DatagramSocket.<init>
   at java/net/DatagramSocket.<init>
   at JIMMessage.feedback
   at JIMEnter.actionPerformed
   at java/awt/Button.processActionEvent
   at java/awt/Button.processEvent
   at java/awt/Component.dispatchEventImpl
   at java/awt/Component.dispatchEvent
   at java/awt/EventDispatchThread.run
com.ms.security.SecurityExceptionEx[JIMMessage.feedback]: cannot access 8000
     at java/net/DatagramSocket.CheckCanReceive
     at java/net/DatagramSocket.receive
     at JIMMessage.feedback
     at JIMEnter.actionPerformed
     at java/awt/Button.processActionEvent
     at java/awt/Button.processEvent
     at java/awt/Component.dispatchEventImpl
     at java/awt/Component.dispatchEvent
     at java/awt/EventDispatchThread.run
Exception occurred during event dispatching:
com.ms.security.SecurityExceptionEx[JIMMessage.feedback]: cannot access 8000
     at java/net/DatagramSocket.CheckCanReceive
     at java/net/DatagramSocket.receive
     at JIMMessage.feedback
     at JIMEnter.actionPerformed
     at java/awt/Button.processActionEvent
     at java/awt/Button.processEvent
     at java/awt/Component.dispatchEventImpl
     at java/awt/Component.dispatchEvent
     at java/awt/EventDispatchThread.run
/************************************************/
Thank you!
0
Comment
Question by:coffeetea
  • 4
  • 4
  • 3
11 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6236524
Is the machine your trying to connect to the same as the web server that the applet was loaded from?
Unsigned applet can only connect to the server that they were loaded from.
0
 
LVL 2

Expert Comment

by:jorj
ID: 6237510
Yes, that's it. You should sign your applet in order to connect to any other host than the one it was loaded from, including localhost  otherwise you will get a security exception.
0
 

Author Comment

by:coffeetea
ID: 6238125
 But how can I sign my applet?Can I sign my applet by writing security certificate code or applying for certificate on the certificate website?and that I can send the message but can't receive the message,why?
  Now I can receive the message through the attributes of Internet Explorer,but it isn't good solutions for the applet communication problem

   
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 92

Expert Comment

by:objects
ID: 6239981
0
 

Author Comment

by:coffeetea
ID: 6247163
I have sit through the document,It is for the microsoft SDK for java. I haven't resolved the problem with the method which the document refer to now ,but I have got much Apocalypse,moreover,I'll try my best to resolve the problem with the above method .
   If  I work out,I'll send my points to you! Thank you very much!
0
 
LVL 92

Accepted Solution

by:
objects earned 60 total points
ID: 6247436
0
 
LVL 2

Expert Comment

by:jorj
ID: 6248130
Maybe I can give you another ideea: you can do a redirecter programm which will run on the host and its only job is to act as a pipe between the applet and the target site. In this way you will not have to pay money for a certificate, and will work on all browsers.
Signing applets using other keys than the ones given by certain key providers will display a warning on the client's computer, and you may not want this.
0
 

Author Comment

by:coffeetea
ID: 6249517
:objects
    Thanks for your help,I'll read the documents and have a try!

:jorj
   Now the client can send message to the server,but the client can't receive the message from the sever.I think Internet Explorer intercept the message and forbid communicating with applet!What about your idea?Can you give me more details?
   Thank you!
0
 
LVL 2

Expert Comment

by:jorj
ID: 6249561
You cannot set a TCP server from the applet, because of the security manager, as we discussed already. Anyway, I use TCP to open a connection from the applet, then I obtain the connection's input and output streams and from here you can do whatever you want.

Be more specific: what have you done and what results have you obtained until now, regarding the applet side.
0
 

Author Comment

by:coffeetea
ID: 6254092
OK!
:jorj
  Thanks for helping me!

: objects  
  I fell for your solutions so I will accept your comment as an answer... your method is good!And I worked out with the documents which you offered.Thanks!

  Thanks everyone for helping me out!You are realy nice all of you!

0
 
LVL 92

Expert Comment

by:objects
ID: 6254221
Thanks for the points :)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
github account with ecipse 1 47
jar file executable 12 51
Custom Java Application connects to database: Which one of the 20? 4 27
Configure a Bean in an XML file 4 31
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

805 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