How To Use Xj3D Library In Netbeans IDE

These are instructions on how to use Xj3D libraries in Netbeans IDE so you can integrate them in your Java application. This tutorial is useful for people that are developing Java applications with Xj3D as a library. If your Java application needs a 3D window that shows X3D or VRML, the best way is to use Xj3D.

Yes, it's Java, but not the programming language. Photo by JpSlim.

You just need to install Xj3D, the Java SDK, and Netbeans IDE. Ignore any document that tells you to install more things. You don't need to set any system variable. Ignore all that.

Follow these simple steps:

1) Install Java SDK (Java SE) 32 bits. There were some problems with the 64 bits version, so install the 32 bits version.

2) Install Xj3D.

3) Install Netbeans IDE.

4) Create a NetBeans project: Java Application.

If you just want to run the Xj3D examples, specify "with existing sources", and use the folder examples/sai as sources.

5) In the menus, select: Tools -> Library Manager -> New Library. Call it for example "Xj3Djars" or whatever you like. Click OK.

6) Select the library that you have just created and add everything in the "jars" folder of Xj3D.

In Windows, it uses to be in C:\Program Files\Xj3D\jars

In Ubuntu Linux, look into: usr/local/Xj3D/jars (it may be in other folder, but for me it was there)

7) Right click on the project -> Properties -> Libraries -> add Library -> Xj3Djars -> add Library

8) In the Project Properties window, select Run -> VM Options

9) In VM Options type this:

If you use Windows XP:

-Xmx450M -Djava.library.path='C:\Program Files\Xj3D\bin'

In Ubuntu (I prefer Fluxbuntu) Linux:

-Xmx450M -Djava.library.path='usr/local/Xj3D/bin'

10) Click OK.

That's all!


Working With Netbeans IDE And X3D Or VRML

Now that you are working with your application that uses X3D or VRML, you will work faster and better if you could read easily and create X3D and VRML files from inside Netbeans IDE.

I had the same problem, so I created the free X3DV Module Suite.


The X3DV Module Suite is a free set of modules to code in X3D and VRML, the open standards for interactive and immersive 3D on Internet. With it, you can create virtual worlds in 3D, using the great edition features of Netbeans IDE.

This Module Suite is for coding in VRML and X3DV (X3D classical VRML encoding, the easy to read .x3dv files).

Just have a look at its section. The advantages of using it are obvious. It is also compatible with X3D-Edit, as it's shown in their website. You can use X3D-Edit for X3D files in xml format, and the X3DV Module Suite for X3D files in classical VRML encoding, and for VRML files.

If you like the X3DV Module Suite, you can help its development by making a donation. If you can't, another way of helping is voting it in any social bookmarking site, or simply voting it in the Netbeans Plugin Directory.

-Jordi R. Cardona-


© by Jordi R. Cardona. Link to this post without copying the text.

If you liked this post, get updates of Hiperia3D News for FREE

2 comments

Anonymous said...

Hi,

I really loved your tutorial. I am working on embedding the Xj3DApplet onto web. I am getting org.web3d.x3d.sai.NotSupportedException: Default Browser implementation cannot create browser reference error. Can you help me in any way?

Thanks

Akhila
akhila844@gmail.com

Jordi R Cardona said...

Sorry I have still not played with the applet version. But you can ask for help here:
http://www.web3d.org/message_boards/viewforum.php?f=7

Post a Comment