• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Another Applet Not Initializing.

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic