Solved

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

Posted on 2001-06-28
11
214 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
[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
  • 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

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!

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

617 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