my desktop app compiles to a little window with no screen. Any ideas what im doing wrong. I read an earlier thread about this that said it would be fixed in the next release 2.1.2.
Then, most likely, it's a problem with the scenario. Check the Java console to see if any exception stack traces are displayed. See: http://www.java.com/en/download/help/javaconsole.xml
If you need help interpreting a stack trace, post it here!
Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM
java.lang.NoClassDefFoundError: Angel$Direction
at Angel.<init>(Angel.java:26)
at Dungeon.<init>(Dungeon.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at greenfoot.export.GreenfootScenarioViewer.instantiateNewWorld(GreenfootScenarioViewer.java:302)
at greenfoot.export.GreenfootScenarioViewer.init(GreenfootScenarioViewer.java:207)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Angel$Direction
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 10 more
This was created when i tried to run the scenario in a web page, cannot create an error in greenfoot. ?
That is odd. It seems as if the Angel class has an inner class called Direction, and for some reason the Angel.Direction class is not being included when you export the scenario. However, I have just successfully exported a scenario with inner classes to the gallery and it worked fine, so perhaps it is something to do with your particular scenario. Can I ask what operating system you are running Greenfoot on (is it Windows?). And would you be willing to upload the source code for the scenario or email it to me (davmac@greenfoot.org)?
Thanks Dave, the problem seems to be with my Enumerated type Direction. I have uploaded the scenario and commented out the offending code in the Angel class so you can have a check. I was using windows vista os.
Ok, I have managed to reproduce the problem on Windows (not on linux though - it seems to work fine for me on linux). I'll look into it further; maybe it's a Greenfoot bug. In the meantime you can probably avoid it by not using inner types.