Solved

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

Posted on 2001-06-28
11
213 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

751 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