• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

problem in an applet

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
I knew that guy would be trouble! Thanks tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic