Solved

Java doesn't work on my Apache server

Posted on 2001-09-14
6
218 Views
Last Modified: 2009-12-16
Hi,

With my browser (MSIE 5.5) I can see Java applets working on the net => no problems.

Now when i put an applet on my own server (Linux RH 7.1) running Appache the applet doesn't show up. I only see a gray box, the size of the applet but nothing in it.

I grabbed an applet from the web (http://www.raingod.com/raingod/resources/Programming/Java/Software/Clocks/AnalogClock.html) and did the following:

1. I copied de applet "AnalogClockApplet.class" to the web root for a certain domain name.
2. I created a file called javatest.htm and put it in the same directory.

Going to that web page only shows a gray box, no clock.

Here the content of the javatest.htm file:

<HTML>
<HEAD>
<TITLE>Analog Clock (Test)</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<P>Hello world</P>
<APPLET CODE="AnalogClockApplet.class"
CODEBASE="."
WIDTH=60 HEIGHT=60>
<PARAM NAME="show-seconds" VALUE="true">
<PARAM NAME="hand-color" VALUE="#000000">
<PARAM NAME="second-hand-color" VALUE="#FF0000">
<PARAM NAME="face-color" VALUE="#FFFFFF">
<PARAM NAME="frame-color" VALUE="#000000">
<PARAM NAME="background-color" VALUE="#FFFFFF">
</APPLET>
</BODY>
</HTML>

What is going wrong, why can't i see the applet?

Thanks in advance
Filips
0
Comment
Question by:Filips
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:heyhey_
ID: 6482432
1. open Java console and copy and paste the output
2. give us URL to your apache server .html file
0
 
LVL 6

Author Comment

by:Filips
ID: 6482592
Here's the URL: http://www.totalcountry.com/javatest.htm

What exactly do you mean by the "Java console" and how can i access it?
0
 
LVL 6

Author Comment

by:Filips
ID: 6482615
Here's the URL: http://www.totalcountry.com/javatest.htm

What exactly do you mean by the "Java console" and how can i access it?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
black earned 100 total points
ID: 6482662
it's not working because it's missing other dependent classes namely:
ClockApplet
ExtendedApplet
what you have to do is put all the classes into an archive say a jar file and put the name of that jar file in you arvhive attribute i.e.
<APPLET archive="myarchive.jar" CODE="AnalogClockApplet.class" CODEBASE="." WIDTH=60 HEIGHT=60>
<PARAM NAME="show-seconds" VALUE="true">
<PARAM NAME="hand-color" VALUE="#000000">
<PARAM NAME="second-hand-color" VALUE="#FF0000">
<PARAM NAME="face-color" VALUE="#FFFFFF">
<PARAM NAME="frame-color" VALUE="#000000">
<PARAM NAME="background-color" VALUE="#FFFFFF">
</APPLET>

or simply put the other class file in the root of your webserver as well.
0
 
LVL 3

Expert Comment

by:black
ID: 6482672
the java console can be enabled my going to tools, internet options, the advanced options tab and clicking on the java console checkbox. You have to close all browser windows and restart your browser. Then you should be able to click on view and then Java Console, this let's you view the stdout and stderr from your java programs for example when you enable the java console and view it, when running your applet you see the following output:
Microsoft (R) VM for Java, 5.0 Release 5.0.0.3802
==============================================
?  help
c  clear
f  run finalizers
g  garbage collect
m  memory usage
q  quit
t  thread list
==============================================
java.lang.ClassNotFoundException: ClockApplet
     at com/ms/vm/loader/URLClassLoader.loadClass
     at java/lang/ClassLoader.loadClassInternal
     at java/lang/ClassLoader.resolveClass
     at com/ms/vm/loader/URLClassLoader.loadClass
     at com/ms/vm/loader/URLClassLoader.loadClass
     at com/ms/applet/AppletPanel.securedClassLoad
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.processSentEvent
     at com/ms/applet/AppletPanel.run
     at java/lang/Thread.run
0
 
LVL 6

Author Comment

by:Filips
ID: 6482780
It works, thanks a lot. The most valueable is that i learned about the java console so i can trace where the problems are.

Filips
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mysql jsp example issue 32 74
Html Table Looping (part 2) 5 35
Eclipse with various Java releases 7 50
Tomcat 9 + java 8 error while trying to deploy a war file 2 723
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question