Solved

Wrong class name in class file!

Posted on 1998-04-12
4
184 Views
Last Modified: 2011-09-20
Hello!
I get the following error when I try to open my applet in Netscape:
Wrong class name in class file
I have checked the names - both my .class-file and the public class inside it are named colorMix.
I have checked upper / lower case and it's OK.
When I run the applet from Borland JBuilder it works fine.

What could be wrong?
0
Comment
Question by:martinag
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 100 total points
ID: 1234055
It seems like your version of Netscape is not fully 1.1 compatible.

To begin with you need Netscape 4.02 or later to view JDK 1.1+ applets.

Additionaly, the 1.1 provided by Netscape in their distribution package is incomplete, you will need the Netscape Java Update from the help | software updates page.

Another common cause for this error is that you did not specify a full relative PATH in the CODEBASE section of your APPLET HTML tag
0
 
LVL 4

Author Comment

by:martinag
ID: 1234056
It's been a long time since you answered my question, but I have now upgraded to Netscape 4.05 and it seems as if the Java 'fix' is shipped with it.

But it still doesn't work.
I get the same error.

Trying to run it with the appletviewer from DOS I get this error:
Start: Applet not initialized

The .class and my html are in the same directory so it can't be the CODEBASE problem.
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1234057
It still needs the full PATH to the CODEBASE.

The JDK 1.1 is only included in the full release of Netscape 4.5, not in the upgrade. If you upgraded via the software updates, then your version of the JDK is still incomplete.
0
 

Expert Comment

by:Charmaine041198
ID: 1234058
martinag, i encountered the wrong class name problem when I compiled my 1.1 source files with the line 'Package mypackagename;' This problem did not occur for 1.0 files.
If you grouped your classes into packages as well, maybe you could remove the 'Package' line from you source code and compile them into a new directory, copy the class files to the same directory as the HTML file and use CODE="colorMix.class" only within the applet tags.
Let me know if that works for you. I'm still experimenting with my program to find out other possible reasons for this error.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse buid path vs tomcat lib path 10 34
runtime exception 2 41
How do I remove an object from a 3 40
Which non-HTML GUI front end to use with Java? 3 24
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

856 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