Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / May 2005

Tip: Looking for answers? Try searching our database.

notinited

Thread view: 
todd - 28 May 2005 17:34 GMT
Help..
O.k.  Here's my situation..   I am new to java.. and have written a few
Applets..I can get these applets to run in the applet viewer no
problem..  I am using JBuilder 4.. anyhow.. when I try to view the htm
through IE I get that @#$@#$ red X and a nice little message "
notinited "..  I was able to get one applet to run through the
browswer..  it was a miracle..  anyhow..  anyone have any suggestions?

I'm desperate here :)
Todd
here's teh console.. and soon.. I'll need to be consoled
Java(TM) Plug-in: Version 1.4.2_03
Using JRE version 1.4.2_03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Todd

Proxy Configuration: No proxy

----------------------------------------------------
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.NoClassDefFoundError: Population (wrong name:
tester/Population)

    at java.lang.ClassLoader.defineClass0(Native Method)

    at java.lang.ClassLoader.defineClass(Unknown Source)

    at java.security.SecureClassLoader.defineClass(Unknown Source)

    at sun.applet.AppletClassLoader.findClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.applet.AppletClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.applet.AppletClassLoader.loadCode(Unknown Source)

    at sun.applet.AppletPanel.createApplet(Unknown Source)

    at sun.plugin.AppletViewer.createApplet(Unknown Source)

    at sun.applet.AppletPanel.runLoader(Unknown Source)

    at sun.applet.AppletPanel.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

java.lang.NoClassDefFoundError: Population (wrong name:
tester/Population)

    at java.lang.ClassLoader.defineClass0(Native Method)

    at java.lang.ClassLoader.defineClass(Unknown Source)

    at java.security.SecureClassLoader.defineClass(Unknown Source)

    at sun.applet.AppletClassLoader.findClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.applet.AppletClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    at sun.applet.AppletClassLoader.loadCode(Unknown Source)

    at sun.applet.AppletPanel.createApplet(Unknown Source)

    at sun.plugin.AppletViewer.createApplet(Unknown Source)

    at sun.applet.AppletPanel.runLoader(Unknown Source)

    at sun.applet.AppletPanel.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)
Tor Iver Wilhelmsen - 28 May 2005 18:00 GMT
> java.lang.NoClassDefFoundError: Population (wrong name:
> tester/Population)

You need to use

code="tester.Population"

in the applet element - class names should be fully qualified there.
Roland - 28 May 2005 18:08 GMT
> Help..
> O.k.  Here's my situation..   I am new to java.. and have written a few
[quoted text clipped - 10 lines]
> Using JRE version 1.4.2_03 Java HotSpot(TM) Client VM
> User home directory = C:\Documents and Settings\Todd
[snip]
> java.lang.NoClassDefFoundError: Population (wrong name:
> tester/Population)

Probably the file 'Population.class' is in the wrong directory: it
should be placed in a subdirectory called 'tester' (subdirectory of the
directory where your html file resides that refers to the applet).

foo\bar\
       |
       +-- test.html (containing st. like
       |       <applet codebase="." code="tester.Population">)
       |
       +-- tester\
                 |
                 +-- Population.class

Signature

Regards,

Roland de Ruiter
  ___      ___
 /__/ w_/ /__/
/  \ /_/ /  \



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.