Click to See Complete Forum and Search --> : [SOLVED]How to enable Apache2 to serve Java applets?


teeitup
04-07-2007, 01:11 AM
Can someone point in the right direction to enable a simple Apache2 web server to serve up a simple Java applet.

The applet works fine when viewed directly from a web browser.
However, when I load the website containing the same through a URL the applet fails.

I'm trying to use WebCam-Server to serve up streaming images from a camera.

The browser states the "applet WebCamApplet notinited".

The java console output:

load: class WebCamApplet.class not found.
java.lang.ClassNotFoundException: WebCamApplet.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: open HTTP connection failed.
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

Apache 2.2.3-4
Java 1.5.0_07
webcam-server 0.50-2

Thanks,

cybertron
04-08-2007, 09:23 PM
At first glance that sounds like a classpath problem. I'm not sure how you set that for Java through Apache, but it shouldn't be too hard to check.

teeitup
04-09-2007, 01:57 AM
Turns out the Java version on the PC I was testing from was too old.

After upgrading the test PC to Java 1.5 it worked perfectly.

cybertron
04-09-2007, 08:50 AM
Excellent. Marking solved.:)