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

x
?
Solved

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

Posted on 2001-06-28
11
Medium Priority
?
216 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
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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 …
Suggested Courses

715 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