Question:
Why does my java programs have error when i load it on website?
Ana S
2009-08-09 05:50:02 UTC
When i load the page from my computer directory, it is fine with no errors. But when i upload it onto my website, i get these errors from Mozilla Firefox and IE.

Mozilla Firefox:

Java Plug-in 1.6.0_14
Using JRE version 1.6.0_14-b08 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Owner
----------------------------------------------------
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
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to
----------------------------------------------------


java.lang.NullPointerException
at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException


IE:

Java Plug-in 1.6.0_14
Using JRE version 1.6.0_14-b08 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Owner
----------------------------------------------------
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
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to
----------------------------------------------------


Exception in thread "thread applet-SlotMachine.class-1" java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file StartButtonListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at SlotMachine.init(SlotMachine.java:81)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Netscape security model is no longer supported.
Please migrate to the Java 2 security model instead.

java.lang.NullPointerException
at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException
Netscape security model is no longer supported.
Please migrate to the Java 2 security model instead.

Had anyone had similar prorblems? How did you fix it?
Four answers:
?
2009-08-09 07:21:29 UTC
Sounds like your StartButtonListener.class file is corrupt somehow. How did you upload it to the server? I would recomile StartButtonListener.class, just to make sure it's cleanly compiled and upload it to the server using a binary transfer method, not ASCII (plain text).



See what happens.



it sounds like the JVM is having difficulty locating your Java class. Java is case sensitive so make sure the StartButtonListener.class file name is mixed case on the server.



The problem isn't with the HTML file, it looks like it might be the location of the Java class file. Now, if you uploaded StartButtonListener.java and NOT StartButtonListener.class, that is probably the problem. You need to compile the .java file (the source) to a .class file (the executable code) and upload the .class file to your server using a binary transfer method.
2016-02-28 08:31:19 UTC
Play a differnent game. Runescape has been dead for over a year now, since the dreaded UpDaTe. Get a 360 or PS3. Only nerds play computer games.
?
2009-08-09 06:57:58 UTC
nullPointerException - you try to access an object that has not been created yet.
2009-08-09 07:49:38 UTC
my opinion is you can contact an expert

webdesining-proraming.blogspot.com


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...