Author Topic: Xith3d with Netbeans  (Read 5763 times)

Offline Xata

  • Just dropped in
  • Posts: 1
    • View Profile
    • Email
Xith3d with Netbeans
« on: 29. June 2011, 05:24:02 PM »
After searching the fourms and only being led to a bunch of dead links.
How do I setup Xith3d in Netbeans?
Thanks!

Offline reubenjoeymawthoh

  • Just dropped in
  • Posts: 5
    • View Profile
    • Email
Re: Xith3d with Netbeans
« Reply #1 on: 07. August 2011, 03:57:06 PM »

1) go to tools -> Libraries -> New Libraries and name it xith3d
   then click Add JAR/Folder and add the following
   xith3d\libs\xith3d.jar
   xith3d\third-party\gluegen\gluegen-rt.jar
   xith3d\third-party\input\jinput.jar
   xith3d\third-party\jaol\jaol.jar
   xith3d\third-party\jogl\jogl.jar
   xith3d\third-party\lwjgl\jinput.jar
   xith3d\third-party\lwjgl\lwjgl-debug.jar
   xith3d\third-party\lwjgl\lwjgl.jar
   xith3d\third-party\lwjgl\lwjgl-util.jar
   xith3d\third-party\math\openmali.jar
   xith3d\third-party\particles\jops.jar
   xith3d\third-party\physics\joode.jar
   xith3d\third-party\xpal-joode.jar
   xith3d\third-party\sound\vorbis.jar
   xith3d\third-party\swt\windows\swt.jar
   xith3d\third-party\xml\jdom.jar
   xith3d\third-party\xml\stax-1.2.0.jar
   xith3d\third-party\xml\stax-api.jar
   xith3d\third-party\xml\jibx\jibx-run.jar
   xith3d\third-party\jagatoo.jar

2) click New Libraries and name it xith3d.natives
   then click Add JAR/Folder and add the following

   xith3d\third-party\gluegen\windows-i586
   xith3d\third-party\jaol\windows-i586
   xith3d\third-party\jogl\windows-i586
   xith3d\third-party\lwjgl\natives

3) goto Projects Tab right click on Libraries and add the above two libraries
   right click on the project name and click Properties -> Run and
   edit the the VMOption as :
 
   -Djava.library.path="${libs.xith3d.natives.classpath}"-Xms512m -Xmx1024m -Djava.security.policy=applet.policy

4) run a sample program


Offline mmcrosb

  • Just dropped in
  • Posts: 6
    • View Profile
    • Email
Re: Xith3d with Netbeans
« Reply #2 on: 29. March 2015, 09:37:00 PM »
Linux 64

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1119)
   at org.lwjgl.Sys$1.run(Sys.java:72)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
   at org.lwjgl.Sys.loadLibrary(Sys.java:81)
   at org.lwjgl.Sys.<clinit>(Sys.java:98)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:128)
   at org.xith3d.render.lwjgl.DisplayModeSelectorNativeImpl.getAvailableModes(DisplayModeSelectorNativeImpl.java:71)
   at org.xith3d.render.config.DisplayModeSelector.getBestMode(DisplayModeSelector.java:134)
   at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:57)
   at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:70)
   at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:75)
   at org.xith3d.render.Canvas3DFactory.createFullscreen(Canvas3DFactory.java:1330)
   at org.xith3d.render.Canvas3DFactory.createFullscreen(Canvas3DFactory.java:1348)



i have not ..party/joal/linux dir, i have party/natives only and when i add this dir:

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library ......../lib/xith3d.natives/natives/liblwjgl.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.UnsatisfiedLinkError: ......./lib/xith3d.natives/natives/liblwjgl.so: ........../lib/xith3d.natives/natives/liblwjgl.so: clase ELF errónea: ELFCLASS32 (Possible cause: architecture word width mismatch)
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1119)
   at org.lwjgl.Sys$1.run(Sys.java:72)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
   at org.lwjgl.Sys.loadLibrary(Sys.java:81)
   at org.lwjgl.Sys.<clinit>(Sys.java:98)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:128)
   at org.xith3d.render.lwjgl.DisplayModeSelectorNativeImpl.getAvailableModes(DisplayModeSelectorNativeImpl.java:71)
   at org.xith3d.render.config.DisplayModeSelector.getBestMode(DisplayModeSelector.java:134)
   at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:57)
   at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:70)
   at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:75)
   at org.xith3d.render.Canvas3DFactory.createFullscreen(Canvas3DFactory.java:1330)
   at org.xith3d.render.Canvas3DFactory.createFullscreen(Canvas3DFactory.java:1348)


Tambien he intentado
sudo apt-get install execstack
execstack -c thelibrary
execstack: cannot get the ELF header: Error de formato: referencia fuera del archivo


Pensando que el problema era de permisos, he copiado todas las dependencias necesarias en una carpeta del sistema, como root, pero el problema sigue

http://forum.lwjgl.org/index.php?topic=3235.msg17937#msg17937

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /var/xith3d-natives/libcairo-swt.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /var/xith3d-natives/libcairo-swt.so: /var/xith3d-natives/libcairo-swt.so: clase ELF errónea: ELFCLASS32 (Possible cause: architecture word width mismatch)
« Last Edit: 29. March 2015, 10:29:21 PM by mmcrosb »

Offline lonesomeStranger

  • Administrator
  • Becoming dependent
  • *****
  • Posts: 139
    • View Profile
Re: Xith3d with Netbeans
« Reply #3 on: 31. March 2015, 05:02:26 AM »
Hi,

Please consider to checkout the SVN trunk instead of downloading a build.

Now joal as well as jogl are upgraded and all natives are placed to jars.

Current content of third_party/joal related to LInux:

Quote
joal.jar
joal-natives-linux-amd64.jar
joal-natives-linux-i586.jar
Anton

Offline mmcrosb

  • Just dropped in
  • Posts: 6
    • View Profile
    • Email
Re: Xith3d with Netbeans Linux 64 SOLVED!!
« Reply #4 on: 01. April 2015, 12:52:08 PM »
Subversion is complicated under netbeans :(
but i solved it manually and "perforced"

- Manual native library instalation (copy/paste) in system directory.
- Manual native library load by Java method under Xith3D requests/naggins.
- Manual jars libraries added to project.

Code: [Select]
public class Environment extends Xith3DEnvironment {
   
    public static void main(String[] args) {
        Environment env;
        try {
            env = new Environment();
        } catch (InputSystemException ex) {
            Logger.getLogger(Environment.class.getName()).log(Level.SEVERE, null, ex);
            System.exit(0);
        }
    }
   
    public Environment() throws InputSystemException {
        //Manual Library Installation and Load
        System.load("/usr/java/packages/lib/xith3d/liblwjgl64.so");
        this.setRenderLoop(new Loop());
        this.getRenderLoop().setXith3DEnvironment(this);
        this.addCanvas(Canvas3DFactory.createWindowed("Hola que ase"));
        this.input = new Input();
        this.input.registerNewKeyboardAndMouse(this.getCanvas().getPeer());
        new Thread() {
            @Override
            public void run() {
                getRenderLoop().begin();
            }
        }.start();
    }
   
    private Input input;
    public final Input getInputSystem() { return input; }
   
}



SOLVED FOR MY BALLS !!
XDDDDDDD
now enjoy!