wood burning stoves*
The moose likes Applets and the fly likes problem in an applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "problem in an applet" Watch "problem in an applet" New topic
Author

problem in an applet

Amey Rane
Greenhorn

Joined: Mar 21, 2007
Posts: 15
The java applet I created shows the following error message when run. The file however gets compiled properly so I do not think there is an error in the code. What does the error mean. Does it mean I need a newer version of JRE?


Java(TM) Plug-in: Version 1.4.2_16
Using JRE version 1.4.2_16 Java HotSpot(TM) Client VM
User home directory = /home/lookout/j3/arane
Proxy Configuration: Browser Proxy Configuration


----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
java.lang.UnsupportedClassVersionError: PurdueCore (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:165)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:581)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:621)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1901)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:550)
at sun.applet.AppletPanel.run(AppletPanel.java:301)
at java.lang.Thread.run(Thread.java:534)
java.lang.ClassFormatError: JAVA_FILES/PurdueCore (Bad magic number)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:165)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:581)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:621)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1901)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:550)
at sun.applet.AppletPanel.run(AppletPanel.java:301)
at java.lang.Thread.run(Thread.java:534)
java.lang.ClassFormatError: JAVA_FILES/PurdueCore (Bad magic number)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:165)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:581)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:621)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1901)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:550)
at sun.applet.AppletPanel.run(AppletPanel.java:301)
at java.lang.Thread.run(Thread.java:534)
Amey Rane
Greenhorn

Joined: Mar 21, 2007
Posts: 15
This error too came up


java.lang.ClassFormatError: JAVA_FILES/SurfCore (Bad magic number)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:165)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:581)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:621)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1901)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:550)
at sun.applet.AppletPanel.run(AppletPanel.java:301)
at java.lang.Thread.run(Thread.java:534)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41124
    
  45
Class files of version 49.0 are created by Java 5, so you need a Java 5 JRE to use them. Or -if you are certain that the class does not use Java 5 features- you can create Java 1.4 version class files using javac's "-source" and "-target" switches.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in an applet
 
Similar Threads
running Applets from a Mac
Problem in running applets in html
NoSuchMethodError x509
applet security is a big pain
Bad Magic number