Author Topic: Web applicatio error with Ubuntu server and bsd  (Read 1045 times)

Offline devys

  • byte
  • *
  • Posts: 1
    • View Profile
Web applicatio error with Ubuntu server and bsd
« 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(
   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 Source)
   at 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12060
    • View Profile
Re: Web applicatio error with Ubuntu server and bsd
« Reply #1 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().