Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applet on Apache error: class not found

Status
Not open for further replies.

12345671

IS-IT--Management
Joined
May 24, 2003
Messages
106
Location
AU
I have down two tests:

First: I put my applet class and HTML file under Microsoft IIS web server, I can view this applet from Windows XP/2K and Redhat 9(mozilla) clients.

Second: I put all these on my apache server on a Redhat box at /var/ I can only view this applet on the apacher server itself. But when I try from a Windows XP client, the error is:

Error loading class: test
java.lang.NoClassDefFoundError
java.lang.ClassNotFoundException: test.....

I am using Java 1.4.2-03 and Apache 2.2 coming with Redhat9. I set a java class path in /etc/profile.d/java.sh as
export PATH=$PATH:/usr/java/j2sdk1.4.2_03/bin/

For apache server, I only did the basic configuration, no much change.

Don't know where I should change, the class path? Apache configuration? Or others? Iptables? I stopped my iptables, while still the same error.

Thanks
 
Post the fully qualified name of your applet, the <applet > tag you are using, and the plugin version in your browser.

Also, a couple of other things :

>>>> export PATH=$PATH:/usr/java/j2sdk1.4.2_03/bin/
This will not affect your CLASSPATH - it will only set the PATH

>>>> I should change, the class path ?
The CLASSPATH env var is not required for running applets - as they are executed on the client - the web server just uploads the byte code for the client JVM to execute.
 
The name of my applet is: test.java, test.class. Test.Java. test.calss and test.htm are all put under /var/
I run it is working on the mozilla on apacher server, but not working on other WinXP machine in IE 6.0. I just use the default java-plug-in in IE. I know they are old, but I don't use fancy latest java functions in my test.class.

I tried 2 ways in HTML file as follwings, both are not working:
<OBJECT CLASSID="java:test.class" height=450 width=450>

</OBJECT>
<APPLET CODE="test.class" height=450 width=450>

</APPLET>

ANother thing: When I put these on IIS web server, I compile test.java with Java 1.2. When I put those on Apache server, I use Java 1.4 to compile test.java. Does this matter? I can try to copy the test.class from IIS web server to Apache server to see if there is version problem. But I don't use latest Java method ot function in my test.class. SO it should be able working on old java plug-in?
I don't know the java-plug-in of mozilla on Apacher server, I remember I installed it, but forget, is there a command to test it directly? Thanks a lot! I am new to Java
 
For my mozilla java plugin, I use symboli link from
/usr/java/j2sdk1.4.2_03/jre/plugin/i386/ns610-gcc32/libjavaplug_oji.so
to
/usr/lib/mozilla-1.2.1/plugins

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top