Please Help me... I have a problem with jme and java web start

Hi everyone…



My problem is with web start, I followed every step of  Wiki: Webstart Step by Step then I  try to launch the application and  everything was going well and then the select display settings appeared  clicked ok and nothing else passes… no errors, no warnings, nothing… I click cancel and this is the message:



java.lang.NullPointerException

at modelo.JuegoCaja.cleanup(JuegoCaja.java:148)

at com.jme.app.BaseGame.start(Unknown Source)

at modelo.JuegoCaja.main(JuegoCaja.java:160)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.sun.javaws.Launcher.executeApplication(Unknown Source)

at com.sun.javaws.Launcher.executeMainClass(Unknown Source)

at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

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





Im sorry... Im too new on this and my English is not too good…  if someone understand o can tell me whats wrong ill appreciate too much thanks… 




I hate NullPointerExceptions. They always seem to be things I can't figure out myself.

Yeah, it's rather difficult to figure out what went wrong with just the stack trace, it may not even be webstart, but something wrong within your application? Does it run within your IDE? If so, then you should post what you did in setting up the webstart.

I am pretty sure that this is not really a webstart issue.

More likely a bad usage of ClassLoader.getResource(), which can be tricky to get right at first. It will return null if it doesn't find a resource.

the Debugger is your best friend if your code does unexpected things :slight_smile:



See where the Exception is thrown (JuegoCaja.java:148) and exactly what object is null.

Then go back from there and figure out why this object is null.

Well, I am trying to get java web start to work as in those tutorials, but I get a few errors compiling the jme/lib jars. Here is the first error:

C:Programming APIjME 2lib>java cvf windows-native.jar *.dll

Exception in thread "main" java.lang.NoClassDefFoundError: cvf

Caused by: java.lang.ClassNotFoundException: cvf

        at java.net.URLClassLoader$1.run(Unknown Source)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(Unknown Source)

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

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

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

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

I am using jME 2 if that helps.

Jedimace1 said:

java cvf windows-native.jar *.dll

It's jar cvf, not java!
Maybe you should just start over again with the tutorial, this time reading even more carefully than before.

Ok, well now it came up with another error. I will worry about it later though, I don't even have a game done yet.