• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Another Applet Not Initializing.

 
J R Hatch
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I have written a panel which does what I want it to when invoked from a frame run on command line like this:



but which never initializes when I try to load it as an applet using the code



So, can anyone tell me what I'm missing? I've tried looking at the errors in the java console, but it's just a bunch of warnings about zooms and ignoring things, no actual errors.


If it matters, I've included the chatpanel code here:

 
Paul Clapham
Sheriff
Posts: 21154
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets aren't allowed to connect to any server other than the one they were loaded from, unless they are signed. Your code appears to be trying to connect to a socket. That's most likely the problem.
 
J R Hatch
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Applets aren't allowed to connect to any server other than the one they were loaded from, unless they are signed. Your code appears to be trying to connect to a socket. That's most likely the problem.


I can see that causing a problem in the future, if I were to try to deploy this so that others can log into my chat server, but right now this panel is trying to connect to a server on the same network card (same computer, even). Would that still happen?
 
Paul Clapham
Sheriff
Posts: 21154
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I said "the same server it was loaded from"; "server" in that phrase refers to a piece of software. Connecting to a different server on the same server constitutes connecting to a different server.

And if you're asking if that was actually the problem, you should be able to look at the Java console and see the error message which is thrown when you fail to connect to the server.
 
J R Hatch
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:I said "the same server it was loaded from"; "server" in that phrase refers to a piece of software. Connecting to a different server on the same server constitutes connecting to a different server.

And if you're asking if that was actually the problem, you should be able to look at the Java console and see the error message which is thrown when you fail to connect to the server.




I see. Where can I get more details on "signing" the applet or server so I can run a chat program?

I guess I was not looking at the java console. I was looking at the web developer error console.
 
Matthew Brown
Bartender
Posts: 4567
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Connecting to a different server on the same server constitutes connecting to a different server.

Isn't language wonderful
 
Paul Clapham
Sheriff
Posts: 21154
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I could have sworn that I typed
Paul Clapham should have wrote:Connecting to a different server on the same computer constitutes connecting to a different server.


But evidently I didn't.

Anyway, to answer your question about where to find out about signing applets, I predict that the google keywords "applet signing tutorial" will lead you directly to Oracle's tutorials about applets.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic