Archived

This topic is now archived and is closed to further replies.

PaulBrause

[java] Cannot start compiled GameFrame application!

Recommended Posts

Hi, I tried to compile and start some of the Demo-Apps that came with the library. I changed into the \examples\src directory of the lib, copied the complete \rc\gameframe folder into the \€xamples\rc folder and was then able to compile e.g. BasicExample.java But when I try to start the complied class BasicExample.class using java BasicExample it does not work, but I get the following message: [e:\gameframe_0_9_5b\examples\src]java BasicExample Trying: gameframe.implementations.jdk11x.CFactory : Failure Trying: gameframe.implementations.jdk12x.CFactory : Failure Trying: gameframe.implementations.jdk14x.CFactory : Failure Trying: gameframe.implementations.msjava4x.CFactory : Failure Exception in thread "main" java.util.NoSuchElementException at java.util.Vector.firstElement(Vector.java:435) at gameframe.GameFrame.getRecommendedEngineFactory(GameFrame.java:613) at gameframe.GameFrame.initAllEngines(GameFrame.java:587) at gameframe.GameFrame.initFromSettings(GameFrame.java:508) at gameframe.GameFrame.init(GameFrame.java:181) at gameframe.core.ApplicationAppletBase.init(ApplicationAppletBase.java: 178) at BasicExample.init(BasicExample.java:106) at BasicExample.main(BasicExample.java:56) What ist this? I tried using JDK 1.4 und now I am using JDK 1.306. CLASSPATH is not set! Compiling works fine but I cannot run the apps. I also cannot start any of the demo HTML-pages neither in Internet Explorer 6, Appletviewer or Mozilla 1.1. Very strange, what am I doing wrong? Can anyone help? Thanks very much for your help! Janni

Share this post


Link to post
Share on other sites
I may be wrong as I have not the while thing at hand for the moment, but if I remember correctly there is only one implementation for Applet graphic engine, which is MS Java. As you are not using the MS Java VM but instead Sun 1.3 and 1.4, the MS Java applet factory refuses to instanciate an engine and at the end when picking a suitable implementation from an empty set, the GameFrame core fails initialization.

Almost every example provided with GF4J is using an applet, so chances are you won''t be able to test them using any JVM from Sun (mostly this is due to some security issues with applets).

I am currently packing my timetable at work so I can rewrite the examples without applets. I keep you informed if you wish.

Regards


Herve

Share this post


Link to post
Share on other sites
Hello,

ok, I solved the problem, I finally could unpack the fameframe.jar. Somwhow the jar command from the JDK did not work, I entered jar x gameframe.jar and the jar command froze.

I finally found out that WINRAR can unpack JARs and could so
unpack the gameframe.jar into the directory where I have my test project. I now have the following directory structure:

/mygame (here is the source code for my apps)
/mygame/com
/mygame/gameframe
/mygame/META-INF

Before I made the error to unpack everything one directory deeper, like this:

/mygame (here is the source code for my apps)
/mygame/gameframe/com
/mygame/gameframe/gameframe
/mygame/gameframe/META-INF

and this did, of course, not work!

Share this post


Link to post
Share on other sites