Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

downlaod an applet

Posted on 1997-10-26
3
Medium Priority
?
269 Views
Last Modified: 2006-11-17
Hi
  I have built a simple server program to answer to browser requests (only to GET). But I didn t success to download correctly HTML page with an applet. The browser downloads correctly the HTML page but not the applet contained in this page. I have every time the same message, in the java console:

# Applet exception: error: java.lang.ClassFormatError: Bad magic number
java.lang.ClassFormatError: Bad magic number
at java.lang.ClassLoader.defineClass(ClassLoader.java)
at netscape.applet.AppletClassLoader.loadClass(AppletClassLoader.java)

What can I do to make the browser downloads correctly an applet.

Thanks

Adel
0
Comment
Question by:Adel
3 Comments
 
LVL 10

Expert Comment

by:kollegov
ID: 1229544
Probably...problems with case sensitivity
Check CODEBASE, CODE and applet name in directory
Better to have URL to check :)


0
 
LVL 4

Accepted Solution

by:
rembo earned 200 total points
ID: 1229545


The magic number is the first few bytes of a file that
determine what type of file it is.

If the magic number is bad, then the file probably
needs to be recompiled.  It may have been corrupted
somehow.  

Can you view it with the appletviewer?

Try recompiling it, that should do it.

-Tony

0
 

Author Comment

by:Adel
ID: 1229546
Thanks for your answser.
But the applet is not corrupted, because the borwser downloads it correctly from the public_html when I use another server.
So the problem is somewhere else, may be because I don t send to the browser the correct information or the correct file format..

Adel
0

Featured Post

Technology Partners: 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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
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 …
Suggested Courses

783 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