Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / February 2005

Tip: Looking for answers? Try searching our database.

installing Xj3D on linux   AAArgh!

Thread view: 
jack andrews - 17 Nov 2004 05:13 GMT
Is this the correct forum for this discussion?

Firstly, i was blown away by Java3D this morning -- i had been looking
at VRML viewers for Linux/Windows (want cross platform client) and
when i saw FreeWRL my heart sank and OpenVRML has a 0.5Mb cpp file
that won't compile for me. Then I thought i'd give Java3D a go as a
last resort .... and it's fast and feature-ful. I was muchly
encouraged.

So I'm going with Xj3D if all works well.

...it appears that the user needs yet another library - Aviatrix - to
get browser.sh to work.

And YES!...  
$ find . -name \*.java -exec grep -H viatrix {} \;
./src/java/xj3d/browser/renderer/ogl/ElumensBrowserComponent.java: *
An Aviatrix3d specific rendering component.

so Xj3D DOES depend on Aviatrix.

So here are the correct Installation instructions for Linux/Unix:
$ wget http://www.web3d.org/x3d/applications/xj3d/Xj3D-M9-unix.tar.gz
$ wget ftp://ftp.j3d.org/pub/aviatrix3d/AV3D-bin-Beta2.tar.gz
$ tar zxf Xj3D-M9-unix.tar.gz #creates Xj3D/
$ mkdir Xj3D/AV3D #(AV3D-bin-Beta2.tar.gz has no top level directory)
$ tar -CXj3D/AV3D -zxf AV3D-bin-Beta2.tar.gz
$ cd Xj3D
$ vi configure #create a new script to write out a correct browser.sh
#!/bin/bash
export TOP=`pwd`
JARS=`find $TOP -name \*.jar -printf %p:`
CLASSPATH=`find $TOP -name images -printf %p:`
export CLASSPATH=$CLASSPATH$JARS$TOP
echo "Using CLASSPATH $CLASSPATH"
BRW=./browser.sh
rm -f $BRW
touch $BRW
echo "#!/bin/bash" >>$BRW
echo "export CLASSPATH=$CLASSPATH" >>$BRW
echo "java -Xmx256M xj3d.browser.Xj3DBrowser" >>$BRW

chmod ug+x $BRW
echo "Created $BRW as executable"
$
$ ./configure
Using CLASSPATH /home/jack/pkg/Xj3D/images:\
/home/jack/pkg/Xj3D/apps/browser/images:\
/home/jack/pkg/Xj3D/jars/xj3d-common.jar:...
Created ./browser.sh as executable
$ ./browser.sh
Uncaught error fetching image:
java.lang.NullPointerException
at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:99)
at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:108)
at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:248)
at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

!!!! I can't win, i've put all the jars in the CLASSPATH as well as
all the images directories. and it still doesn't work.

Help greatly appreciated.

Jack
Joerg Scheurich aka MUFTI - 17 Nov 2004 11:31 GMT
> Firstly, i was blown away by Java3D this morning -- i had been looking
> at VRML viewers for Linux/Windows (want cross platform client)

There is a another "free beer" VRML viewer for personal use for Linux/Windows:
Octaga.
It looks like, there may be problems to display the text node and sometimes
problems to find files but it may be worth a look.
At least, it looks like it supports "directOutput TRUE" scripts like in

http://www.web3d.org/x3d/specifications/vrml/ISO_IEC_14772-All/part1/javascript.
html#AccessingOtherNodes


which is rare in Linux VRML viewers 8-(

> So I'm going with Xj3D if all works well.

> ...it appears that the user needs yet another library - Aviatrix - to
> get browser.sh to work.

> And YES!...  
> $ find . -name \*.java -exec grep -H viatrix {} \;
> ./src/java/xj3d/browser/renderer/ogl/ElumensBrowserComponent.java: *
> An Aviatrix3d specific rendering component.

AFAIK, the current non development version of Xj3D still supports both the
java3D and OpenGL/Aviatrix3d renderer. So finding sourcecode alone
do not say much...

> $ ./browser.sh
> Uncaught error fetching image:
[quoted text clipped - 4 lines]
> at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
> at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

This do not look like a Aviatrix3d related problem....

> !!!! I can't win, i've put all the jars in the CLASSPATH as well as
> all the images directories. and it still doesn't work.

AFAIK, there is a advice of the maintainers, to put the jars into
directories like lib/ext in the java tree...

so long
MUFTI
Signature

Die Taufbecken und gesunden Wirkungen sind nicht zugaenglich
durch den Browser
          (aus einem Softwarehandbuch, Stichworte: font und sound effect)

jack andrews - 18 Nov 2004 04:51 GMT
Joerg Scheurich aka MUFTIwrote:
> There is a another "free beer" VRML viewer for personal use for Linux/Windows:
> Octaga.

doesn't plug in to a browser, tho.

well, i've found  a raft of other jars and dll/so's that browser
depends on.  see the end of the post for a shell script commenting on
how to get these and install them.  the shell script takes the DEV and
APPS snapshot from xj3d site and constructs an appropriate browser
shell scripte

> AFAIK, there is a advice of the maintainers, to put the jars into
> directories like lib/ext in the java tree...

now, i've put JOGL, JOAL, and everything else but the xj3d classes in
$JAVA/jre/lib/ext.
i run browser, and i finally get a window displaying before **CRASH**
another one bites the dust.  from a vague article i read a few hours
ago, it seems this problem may be because my X was built with a
different g++ to the JVM.  I remember why I don't use C++.

here's the output of the JVM... the shell script comes after it:

[jack@linux xxx]$ ./browser

An unexpected exception has been detected in native code outside the
VM.
Unexpected Signal : 11 occurred at PC=0x59C05AB7
Function=XVisualIDFromVisual+0x7
Library=/usr/X11R6/lib/libX11.so.6

Current Java thread:
       at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo0(Native
Method)
       at net.java.games.jogl.impl.JAWT_DrawingSurface.GetDrawingSurfaceInfo(JAWT_DrawingSurface.java:43)
       at net.java.games.jogl.impl.x11.X11OnscreenGLContext.lockSurface(X11OnscreenGLContext.java:167)
       at net.java.games.jogl.impl.x11.X11OnscreenGLContext.makeCurrent(X11OnscreenGLContext.java:108)
       - locked <0x45c3d180> (a
net.java.games.jogl.impl.x11.X11OnscreenGLContext)
       at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)
       - locked <0x45c3d180> (a
net.java.games.jogl.impl.x11.X11OnscreenGLContext)
       at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:112)
       at java.awt.Component.setBounds(Component.java:1664)
       at java.awt.BorderLayout.layoutContainer(BorderLayout.java:691)
       - locked <0x45aba948> (a java.awt.Component$AWTTreeLock)
       at java.awt.Container.layout(Container.java:1020)
       at java.awt.Container.doLayout(Container.java:1010)
       at java.awt.Container.validateTree(Container.java:1092)
       at java.awt.Container.validateTree(Container.java:1099)
       at java.awt.Container.validateTree(Container.java:1099)
       at java.awt.Container.validateTree(Container.java:1099)
       at java.awt.Container.validateTree(Container.java:1099)
       at java.awt.Container.validate(Container.java:1067)
       - locked <0x45aba948> (a java.awt.Component$AWTTreeLock)
       at java.awt.Window.show(Window.java:461)
       at xj3d.browser.Xj3DBrowser.main(Xj3DBrowser.java:1153)

Dynamic libraries:
08048000-08057000 r-xp 00000000 03:01 412721    
/usr/local/j2sdk1.4.2/bin/java
08057000-08059000 rw-p 0000e000 03:01 412721    
/usr/local/j2sdk1.4.2/bin/java
[snip]
4048c000-40542000 r-xp 00000000 03:01 100414    
/usr/lib/libstdc++.so.5.0.5
40542000-40547000 rw-p 000b5000 03:01 100414    
/usr/lib/libstdc++.so.5.0.5
[snip]
598f5000-59b23000 r-xp 00000000 03:01 425158    
/usr/local/j2sdk1.4.2/jre/lib/i
386/libXm.so.3
59b23000-59b3d000 rw-p 0022e000 03:01 425158    
/usr/local/j2sdk1.4.2/jre/lib/i
386/libXm.so.3
[snip]
59b50000-59b57000 r-xp 00000000 03:01 116517    
/usr/X11R6/lib/libXp.so.6.2
59b57000-59b58000 rw-p 00006000 03:01 116517    
/usr/X11R6/lib/libXp.so.6.2
59b58000-59ba8000 r-xp 00000000 03:01 116525    
/usr/X11R6/lib/libXt.so.6.0
59ba8000-59bac000 rw-p 0004f000 03:01 116525    
/usr/X11R6/lib/libXt.so.6.0
59bac000-59bb4000 r-xp 00000000 03:01 116489    
/usr/X11R6/lib/libSM.so.6.0
59bb4000-59bb5000 rw-p 00007000 03:01 116489    
/usr/X11R6/lib/libSM.so.6.0
59bb5000-59bc9000 r-xp 00000000 03:01 116485    
/usr/X11R6/lib/libICE.so.6.3
59bc9000-59bcb000 rw-p 00013000 03:01 116485    
/usr/X11R6/lib/libICE.so.6.3
59bcc000-59bd9000 r-xp 00000000 03:01 116501    
/usr/X11R6/lib/libXext.so.6.4
59bd9000-59bda000 rw-p 0000d000 03:01 116501    
/usr/X11R6/lib/libXext.so.6.4
59bda000-59bdf000 r-xp 00000000 03:01 116527    
/usr/X11R6/lib/libXtst.so.6.1
59bdf000-59be0000 rw-p 00004000 03:01 116527    
/usr/X11R6/lib/libXtst.so.6.1
59be0000-59cbf000 r-xp 00000000 03:01 116491    
/usr/X11R6/lib/libX11.so.6.2
59cbf000-59cc2000 rw-p 000de000 03:01 116491    
/usr/X11R6/lib/libX11.so.6.2
[snip]
5aa08000-5aa42000 r-xp 00000000 03:01 116565    
/usr/X11R6/lib/tls/libGL.so.1.2
5aa42000-5aa47000 rwxp 0003a000 03:01 116565    
/usr/X11R6/lib/tls/libGL.so.1.2
5aa4a000-5aad4000 r-xp 00000000 03:01 116606    
/usr/X11R6/lib/libGLU.so.1.3.50
2
5aad4000-5aad6000 rw-p 00089000 03:01 116606    
/usr/X11R6/lib/libGLU.so.1.3.50
2
Heap at VM Abort:
Heap
def new generation   total 576K, used 414K [0x446d0000, 0x44770000,
0x45a80000)
 eden space 512K,  71% used [0x446d0000, 0x4472ba98, 0x44750000)
 from space 64K,  75% used [0x44750000, 0x4475c098, 0x44760000)
 to   space 64K,   0% used [0x44760000, 0x44760000, 0x44770000)
tenured generation   total 2988K, used 2256K [0x45a80000, 0x45d6b000,
0x546d000
0)
  the space 2988K,  75% used [0x45a80000, 0x45cb42f0, 0x45cb4400,
0x45d6b000)
compacting perm gen  total 9728K, used 9666K [0x546d0000, 0x55050000,
0x586d000
0)
  the space 9728K,  99% used [0x546d0000, 0x55040bf0, 0x55040c00,
0x55050000)

Local Time = Thu Nov 18 04:22:43 2004
Elapsed Time = 18
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (Blackdown-1.4.2-fcs mixed mode)
#

----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------

Here's my shell script: 'configure' which gets the snapshots and
generates 'browser':

#!/bin/bash
#
#   xj3d-configure
#
#   quick-start:
#    prerequisites: JOGL, Java3D, JOAL, Rhino
#    modify SNAPSHOT, set DOWNLOAD to "yes" then run!
#
#   providing you have installed Java3D and you can view the applets
at
#       $JAVA/demo/java3d/index.html
#   and you have installed JOGL (jogl.dev.java.net) (2 packages)
#       jogl.jar --> $JAVA/jre/lib/ext/jogl.jar
#       !UNZIP! jogl-natives-linux.jar
#                --> $JAVA/jre/lib/ext/libjogl_cg.so
#                --> $JAVA/jre/lib/ext/libjogl.so
#   and you have installed JOAL (https://games-binaries.dev.java.net\
#                              
/build/joal/joal-1.1.0-b04-bin-linux.zip\
#       joal...linux.zip
#                --> $JAVA/jre/lib/ext/libjoal.so
#                --> $JAVA/jre/lib/ext/joal.jar
#   and you have installed Rhino
(ftp://ftp.mozilla.org/pub/mozilla.org/js/)
#       unzip -j rhino1_5R5.zip \*/js.jar
#         js.jar --> $JAVA/jre/lib/ext/js.jar
#   this script will cobble together the rest of the bits and pieces
you
#   need to view VRML and X3D.
#    Run this script after modifying SNAPSHOT, and JOGL to suit your
needs
#
#    look in http://www.xj3d.org/downloads for the DEV/APPS release
you want
LIBCHROME=/usr/lib/mozilla-1.6/chrome
SNAPSHOT=20041013
DEV=Xj3D-DEV-$SNAPSHOT
APPS=Xj3D-APPS-$SNAPSHOT
export PKG=xj3d-$SNAPSHOT
DOWNLOAD=no

if test $DOWNLOAD = yes; then
wget http://www.xj3d.org/downloads/$DEV.zip
wget http://www.xj3d.org/downloads/$APPS.zip
wget $JOGL
fi

rm -rf $PKG
mkdir $PKG
for zip in $DEV.zip $APPS.zip; do unzip -d $PKG $zip; done
JARS=`find . -name \*.jar -printf %p:`
#
#  Now create the browser script
#
export CLASSPATH=$CLASSPATH:$JARS
cat >browser <<EOS
#!/bin/bash
export CLASSPATH=$CLASSPATH
java -Xmx256M xj3d.browser.Xj3DBrowser
EOS

chmod ug+x ./browser
Alan Hudson - 22 Feb 2005 19:41 GMT
We have created an autoinstaller for linux now.  

Please try this:

http://www.xj3d.org/download.html

By default we use Aviatrix3d which is our Java Scenegraph API.  You can
change it to use Java3D by adding the -j3d switch to the browser.sh


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.