Solved

Wrong class name in class file!

Posted on 1998-04-12
4
180 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
hash value 2 38
Receive file in Servlet 1 36
for i loop in grovy 1 32
Unable to start eclipse ? 17 86
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now