aspose file tools*
The moose likes Applets and the fly likes Another Applet Not Initializing. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Another Applet Not Initializing. " Watch "Another Applet Not Initializing. " New topic
Author

Another Applet Not Initializing.

J R Hatch
Greenhorn

Joined: Sep 07, 2011
Posts: 26
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
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

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

Joined: Sep 07, 2011
Posts: 26
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
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

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

Joined: Sep 07, 2011
Posts: 26
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

Joined: Apr 06, 2010
Posts: 4240
    
    7

Paul Clapham wrote:Connecting to a different server on the same server constitutes connecting to a different server.

Isn't language wonderful
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18115
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Another Applet Not Initializing.
 
Similar Threads
button hang in threaded server
JList deleting multiple items
FlowLayout Alignment, anyone?
NullPointerException
using an applet to open another window (JFrame)