www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: devys on August 27, 2012, 11:55:26 pm

Title: Web applicatio error with Ubuntu server and bsd
Post by: devys on August 27, 2012, 11:55:26 pm
Hi everyone,
I am developing a web application with jpct, using netbeans as IDE.
The application works fine on netbeans with the web application configuration setup, on a windows pc.
When I deploy the application on my ubuntu headless server and try to run it from a client with the jnlp page created by netbeans it gives an error. same error is received with netbeans on a BSD computer.
The error is :
Java.lang.ArrayIndexOutOfBoundsException: 0
   at xyzchess.main(xyzchess.java:149)
   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)

and the line is :
BP1=Loader.load3DS("assets/cubo.3ds", 1.8f)[0];
where BP1 is an object3D.
the line does not give any issue on a windows OS, does anyone know why that could happen?
Thank you in advance for the time dedicated me,
kind regards
Devys
Title: Re: Web applicatio error with Ubuntu server and bsd
Post by: EgonOlsen on August 28, 2012, 08:04:30 pm
It's usually better to include the resources into your jart (or create an additional one) and access them via the InputStream that you can obtain from Class.getResourceAsStream().