Solved

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

Posted on 2001-06-28
11
202 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
Comment Utility
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
Comment Utility
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
Comment Utility
 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
 
LVL 92

Expert Comment

by:objects
Comment Utility
0
 

Author Comment

by:coffeetea
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 92

Accepted Solution

by:
objects earned 60 total points
Comment Utility
0
 
LVL 2

Expert Comment

by:jorj
Comment Utility
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
Comment Utility
: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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the points :)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array6 challenfge 6 62
endX challenge 2 48
Free Alternative to JIRA 4 51
bitbucket vs gitbucket 3 29
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

762 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