Sorry for the disturbance but I am running virtual box with windows 7 and i have net beans with the latest JDK 7u*……
This is my classs
====================================================================================
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
public class GameStarter extends SimpleApplication {
@Override
public void simpleInitApp() {
System.out.println(“It does not even get here”);
Box box = new Box(Vector3f.ZERO, 1, 1, 1);
Geometry geom = new Geometry(“Box”, box);
Material mat = new Material(assetManager,”Common/MatDefs/Misc/Unshaded.j3md”);
mat.setColor(“Color”, ColorRGBA.Blue);
geom.setMaterial(mat);
rootNode.attachChild(geom);
}
public static void main(String args[]) {
SimpleApplication gm = new GameStarter();
gm.start();
}
}
==============================================================
This is the error after i run it
=====================================================================
Jul 17, 2012 12:00:37 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.0.0 Beta
Jul 17, 2012 12:00:37 AM com.jme3.system.Natives extractNativeLibs
INFO: Extraction Directory: C:UsersMustafaDevDocumentsNetBeansProjectsJmonkeyTest
Jul 17, 2012 12:00:37 AM com.jme3.system.lwjgl.LwjglAbstractDisplay run
INFO: Using LWJGL 2.8.3
Jul 17, 2012 12:00:37 AM com.jme3.system.lwjgl.LwjglDisplay createContext
INFO: Selected display mode: 1280 x 720 x 0 @0Hz
Jul 17, 2012 12:00:37 AM com.jme3.app.Application handleError
SEVERE: Failed to create display
org.lwjgl.LWJGLException: Pixel format not accelerated
at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:214)
at org.lwjgl.opengl.Display.createWindow(Display.java:306)
at org.lwjgl.opengl.Display.create(Display.java:873)
at org.lwjgl.opengl.Display.create(Display.java:782)
at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:137)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
at java.lang.Thread.run(Thread.java:722)
Jul 17, 2012 12:00:37 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.IllegalStateException
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:147)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:182)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:223)
at java.lang.Thread.run(Thread.java:722)
Exception: java.lang.NullPointerException thrown from the UncaughtExceptionHandler in thread “LWJGL Renderer Thread”
=============================================================================
Can someone please tell me what is wrong with my code becuase this is for unvieristy project and the code seems to work on other students computer but not mine. Is this a driver problem? Is it the fact that i use virtual box? please help…
thank you
Virtual PCs are not very well supported by lwjgl as they mostly do not allow proper access to all OpenGL functions of the graphics card.
Thanks for the advice. the reason why i do it in virtual pc is because i keep my development work away from my pc by having a virtual box. but will give it a try now now and see how it goes. Thank for the reply bro
I use VMWare workstation without any problems (I actually run 2/3 copies of my game on the same computer, each in one virtual windows XP). If you have money and want to get a good virtual env, that’s worth it. If not, well, you can still get it for free
If you work linux based, take a look at kvm, if you have a secondary graficcard, you can forward the whole peg slot to the guest, and use a onboard graficcard for the host.
Best solution possible in terms of performance.
I actually tried it on my host and it works like a charm!.. Thanks for the answers guy. I will be asking more question as i am making a game using jMonkey game engine for my final year project at university.