Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Problem with Xith3DSoundTest  (Read 2884 times)
0 Members and 1 Guest are viewing this topic.
Offline jeep

Senior Newbie





« Posted 2005-09-23 11:27:01 »

When trying to run the sound test...i get an error and it locks up....

C:\xith3d>env2

C:\xith3d>set ANT_HOME=C:\ant\ant1.6.5

C:\xith3d>set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_04

C:\xith3d>set PATH=C:\ant\ant1.6.5\bin;C:\Program Files\Java\jdk1.5.0_04\bin

C:\xith3d>cd demo

C:\xith3d\demo>xith3dsoundtest

C:\xith3d\demo>echo You should modify this file in order to run in your environment
You should modify this file in order to run in your environment

C:\xith3d\demo>runtest com.xith3d.test.SoundTest

C:\xith3d\demo>set PATH=C:\ant\ant1.6.5\bin;C:\Program Files\Java\jdk1.5.0_04\bin;../third-party/joal/windows;../third-p
arty/joal/windows

C:\xith3d\demo>java -Djava.library.path=../third-party/jogl/jogl-win32;../third-party/joal/windows -Xmx50m -Xms20m -clas
spath ../third-party/jogl/jogl-win32/jogl.jar;../third-party/vecmath/vecmath.jar;../third-party/xith/xith_utilities.jar;
../libs/xith3d.jar;../third-party/misc/vorbis.jar;../third-party/misc/junit.jar;../third-party/misc/log4j.jar;../third-p
arty/joal/windows/joal.jar com.xith3d.test.SoundTest
Available 0: GLCapabilities [DoubleBuffered: false, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits
: 8, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0 ] MS: false 0 Scor
e: 1356
[---SNIP---]
Chosen index: 4
Chosen capabilities:
GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 8, Red: 8, G
reen: 8, Blue: 8, Alpha: 8, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0 ] MS: false 0
Init GL is net.java.games.jogl.impl.windows.WindowsGLImpl
OpenGL Renderer = RADEON 9800 Pro x86/SSE2
OpenGL Version = 2.0.4955 WinXP Release
OpenGL Vendor = ATI Technologies Inc.
OpenGL Extensions = GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array GL_S3_s3tc GL_ARB_depth_text
ure GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample GL_ARB_occlusion_qu
ery GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow GL_ARB_s
hadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_A
RB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_transpo
se_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos G
L_ATI_draw_buffers GL_ATI_element_array GL_ATI_envmap_bumpmap GL_ATI_fragment_shader GL_ATI_map_object_buffer GL_ATI_sep
arate_stencil GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_array_object GL_
ATI_vertex_attrib_array_object GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vert
ex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax GL
_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_
packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT
_shadow_funcs GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_textu
re_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotrop
ic GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle GL_EXT_vertex_arra
y GL_EXT_vertex_shader GL_HP_occlusion_test GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection GL_SGI_colo
r_matrix GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_te
xture_lod GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_extensions_string WGL_EXT_swap_control
ALFactory.init - Native: Enter
ALFactory.init - Native: Exit
Pointer = 244713496
ALC = net.java.games.joal.ALCImpl@a32b
OpenAL sound driver initialized with 61 availble sources
Exception in thread "main" java.lang.Error: A null URL was passed to MediaContainer.
        at com.xith3d.scenegraph.MediaContainer.<init>(MediaContainer.java:74)
        at com.xith3d.test.SoundTest.<init>(SoundTest.java:134)
        at com.xith3d.test.SoundTest.main(SoundTest.java:258)

Anyone know the problem with the sound test?

I used these files:

Xith3D_2005-08-31_cvs.tar.gz
third-party.tar.gz

with a clean install of the jdk 1.5 update 4...

C:\xith3d>env2

C:\xith3d>set ANT_HOME=C:\ant\ant1.6.5

C:\xith3d>set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_04

C:\xith3d>set PATH=C:\ant\ant1.6.5\bin;C:\Program Files\Java\jdk1.5.0_04\bin

C:\xith3d>java -version
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2005-09-23 13:32:02 »

make sure the ./demo/ directory and ./ directories are in your class path as the resources are often relitive to those paths.

i.e.:
c:\xith3d>java -cp .;./demo/;etc;   etc...

Try using the included batch files as well, they should work on windows.

Will.


Offline jeep

Senior Newbie





« Reply #2 - Posted 2005-09-24 03:52:52 »

adding ";." to the end of -Djava.library.path in runtest.bat seemed to solve the problem. could have probably done it at the front too.

i'd suggest adding this quick fix in the next release just so the whole thing runs out of the box when you unzip it assuming your environment uses the jdk correctly. you might as well include the third-party files with the zip too so your download and install instructions would simply be to download and unzip one file.

also, i read somewhere about copying files to the jdk directories...bad suggestion...best just to link the libraries from the third-party directory and jars.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #3 - Posted 2005-09-24 10:08:52 »

Are you sure it was added to -Djava.library.path and not -cp?  Generally those resources are loaded from the classpath not the library path.

The third-party libs are not included with the download to reduce download time for people who already have them.

Regarding the files into jdk directories, it is the way we recommend to new users to keep their command line commands down in size.  Can you explain why you think this is a "bad suggestion"?

Will.

Offline jeep

Senior Newbie





« Reply #4 - Posted 2005-09-28 07:16:18 »

oops, i added it to the end of -classpath in runtest.bat. sorry.

i forgot to mention that i also added ../third-party/joal/windows to my path at the beginning as well before i ran the batch file. not sure why I had to do that to get it to work since it is in library path in runtest.bat. there is something magically wrong somewhere i'm not understanding.

you taint your jdk installation (opens yourself to version conflict of dlls). it also requires recopying if you install a new jdk. imho, best to make sure it links from the sandbox.

i'm probably spoiled with comcast delivering over 6 mbps downstream now.

probably not important since anyone using xith3d are probably competent enough to figure out problems like these though it can be a pain and discourage those that are trying to learn.

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #5 - Posted 2005-09-29 01:41:58 »

I understand what you are saying.  The instructions are based on my own experiance.  When starting on Xith3D, it was nice just be be able to call "java -cp xith3d.jar;classes/ mydemo" (as opposed to a ten-line mega command) to run the program.

Perhaps if we created a nice development environment where you could go "xith3d mydemo" to run it all automatically we could replace those instructions.  As they stand now, my personal believe is that the way documented is the easiest way for most new users.

If you would like to work on a small dev setup for new users, you are welcome to do so Smiley

Cheers,

Will.

Offline jeep

Senior Newbie





« Reply #6 - Posted 2005-10-08 22:01:33 »

the demos with xith3d did come with bat files so that made it easy.  i just ran into those two minor environment issues getting the bat files to run.

i can understand the situation of writing your first app and having to include all the right jars and dlls on the command line. I just feel it is bad to suggest bad practices (corrupting the jre installation) in install instructions, especially for newbies.

my suggestion is to provide suggestions on better practices and leave it up to individual to use a bad practice:

1. suggest using eclipse, jbuilder, or other ide, where one just has to select the jars and dlls they want added.

2. provide an easily configured build.xml file that includes all the jars and dlls in the library path.

this is the route i took with jme, but my build.xml is a bit ugly and took me awhile to write. i actually copied all my dlls into a single lib/win32 directory and copied all the jars into the lib directory so that i could use a simple include filter with the build.xml. this is a bad practice since it makes updating a single component sloppy.

the advantage of xith3d here is that your third-party directory structure is well organized to where it wouldn't be a bad idea to have ant copy all the dlls from the well organized third-party lib directory structure and into the build/lib/win32 directory and all the jars in a build/lib directory...and consequently to the dist directory.

ant - bat and sh file to set environment for ant and the jdk, build.properties, build.xml
src - your source code
lib - jars and native code
build - created by ant that copies all the java files, creates all the class files, intermediate jar file, and reorganized lib directory containing used jars and native code.
dist - created by ant that creates the final jar (use retroguard and/or proguard to optimize and protect your jar) and  reorganized lib directory containing used jars and used native code. the dist can also be wrapped into a distributable jws.

3. provide easily configured bat files (like the ones that the demos use).
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #7 - Posted 2005-10-12 01:24:48 »

ant for running the demos is probably the way to go being that it is cross-platform.  Being a mac user myself, I'm not really compelled to keep .bat files updated.

Aside:  Regardless of what IDE I use, I always have an ant setup so I can build it without the overhead of the IDE when nessesary.  I believe this is good practice as it means I understand what my code is doing and am not letting the IDE do any magic for me.  It also means migrating between IDE's is quite easy - and when there are multiple developers on the project this is even more important.

Will.

Offline jeep

Senior Newbie





« Reply #8 - Posted 2005-10-14 03:31:05 »

I agree with this. ant is cross-platform, looks good on the resume, and doesn't hide any of the details. Someone like me on the PC will have a tested build script written by someone on the Mac.
Pages: [1]
  ignore  |  Print  
 
 

 
hadezbladez (331 views)
2018-11-16 13:46:03

hadezbladez (171 views)
2018-11-16 13:41:33

hadezbladez (329 views)
2018-11-16 13:35:35

hadezbladez (80 views)
2018-11-16 13:32:03

EgonOlsen (2170 views)
2018-06-10 19:43:48

EgonOlsen (2197 views)
2018-06-10 19:43:44

EgonOlsen (1375 views)
2018-06-10 19:43:20

DesertCoockie (2001 views)
2018-05-13 18:23:11

nelsongames (1643 views)
2018-04-24 18:15:36

nelsongames (2294 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!