aspose file tools*
The moose likes Applets and the fly likes Applet not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet not working " Watch "Applet not working " New topic
Author

Applet not working

chetan verma
Greenhorn

Joined: Jan 20, 2006
Posts: 3
Hi,
I am using Tomcat 4.1 as the server. i have a simple java applet HelloWorld.java . have kept the class file and html calling applet in proper loction. am using https.
Problem: the applet is accessible from the same machine(i.e. machine where tomcat is installed) url:https://<DNS>:8443/chat/index.html , where index.html has the applet tag. note: DNS is registered

but when i try to open the url from any other machine, the html page loads but NOT the applet. i cant reaaly find the problem..browser says:Applet not inited. neeed urgent help!!

Below is the message in Java Console:-
load: class HelloWorld.class not found.

java.lang.ClassNotFoundException: HelloWorld.class

at sun.applet.AppletClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.applet.AppletClassLoader.loadCode(Unknown Source)

at sun.applet.AppletPanel.createApplet(Unknown Source)

at sun.plugin.AppletViewer.createApplet(Unknown Source)

at sun.applet.AppletPanel.runLoader(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.io.IOException: Authentication failure

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at java.net.HttpURLConnection.getResponseCode(Unknown Source)

at sun.applet.AppletClassLoader.getBytes(Unknown Source)

at sun.applet.AppletClassLoader.access$100(Unknown Source)

at sun.applet.AppletClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

... 10 more

URGENT HELP NEEDED !!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41885
    
  63
Welcome to JavaRanch.

Regarding the urgency of your question, Ease Up.

Note that the error message says "class HelloWorld.class not found", not "class HelloWorld not found". You probably have code="HelloWorld.class" in your applet tag instead of code="HelloWorld".


Ping & DNS - my free Android networking tools app
Full Fill
Greenhorn

Joined: Jan 13, 2006
Posts: 2
what's the jdk version are you using to compile the applet?as I know, you must use jdk1.3 or earlier to compile the source, IE will find the class, or it will say class not found.and you'd better use jdk1.1 language syntax to fie MS jre.
sorry for my english, and hope be helpful.
chetan verma
Greenhorn

Joined: Jan 20, 2006
Posts: 3
Hi ulf..
i mentioned it before that the applet is loading on the same machine.

as far as knew, the .class extension may/maynot be used in <applet code="">

anyways, i checked and changed code="HelloWorld" and the same error has occured. the applet is loading successfully on the same machine.. but not on other,, the message in java console is same as before with 1 change:

java.lang.ClassNotFoundException: HelloWorld

NOTE: May be some kind of security issue is there, if u see the console msg carefully it says: Caused by: java.io.IOException: Authentication failure

any idea wat does dat mean??

My aim is not to run this HelloWorld applet.. its actually a test applet i made juct to check whether simple applets are loading properly or not..

As for JDK. im using j2sdk1.4.2_08
Ujjwala J.
Greenhorn

Joined: Feb 05, 2006
Posts: 1
I am facing a similar problem. Did you get any solution for it?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Applet not working