Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

downlaod an applet

Posted on 1997-10-26
3
Medium Priority
?
261 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
[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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
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.
Suggested Courses

705 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