Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (683)
Games in Android Showcase (196)
games submitted by our members
Games in WIP (751)
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  
  Runtime exception in J3D when running JOGL  (Read 1801 times)
0 Members and 1 Guest are viewing this topic.
Offline shawnkendall

Senior Devvie

« Posted 2003-07-30 15:39:15 »

Hi all,
I am trying to use one or my existing J3D loaders to load geometry using J3D classes, then process to generate a new non-J3D geometry graph for my JOGL renderer.

Problem is, it seems that even if I never do any J3D rendering, in fact the error is in a non-live setTransform call, J3D blows up on trying to load jawt.dll.

Any ideas?

java.lang.UnsatisfiedLinkError: Native Library C:\j2sdk1.4.2\jre\bin\jawt.dll already loaded in another classloader
      at java.lang.ClassLoader.loadLibrary0(
      at java.lang.ClassLoader.loadLibrary(
      at java.lang.Runtime.loadLibrary0(
      at java.lang.System.loadLibrary(
      at Method)
      at com.imi.j3d.loaders.rtg.RtgLoader.readHierarchy(
      at com.imi.j3d.loaders.rtg.RtgLoader.loadMain(
      at com.imi.j3d.loaders.rtg.RtgLoader.loadMain(
      at com.imi.j3d.loaders.rtg.RtgLoader.load(
      at GearsTest$GearRenderer.init(

I moved my load call outside of the init, i.e. before GLCanvas canvas is made and it worked fine.

Still, what is the error?  J3D loads jawt.dll and JOGL from different classloaders so there COULD be a conflist depending on what stage of the load the app is in?

Shawn Kendall
Cosmic Interactive, LLC
Offline sugarshark

Junior Devvie

Sugar to the sharks.

« Reply #1 - Posted 2003-07-31 06:56:19 »

What happens if you move J3D out of you 'ext' directory and into your normal classpath?

I used to think that the brain was the most wonderful organ in my body.  
Then I realized who was telling me this.
-- Emo Phillips
Offline shawnkendall

Senior Devvie

« Reply #2 - Posted 2003-07-31 11:55:00 »

Actually I don't run like that.  I have several version os J3D for testign and I point the runtime enviroment all over depending what I want to test.
Also, I did try in ext as well as elsewhere.

Like I said, I just moved the load call and it worked.  Since I am only doing R & D, it's fine for now but I am curious as to why JOGL and J3D would conflict on loading jawt.dll - AWT and also why J3D loads it when I only use BranchGroup, TranformGroup and Shade3D in a non-live, non-attached scene graph.

Shawn Kendall
Cosmic Interactive, LLC
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder

Java games rock!

« Reply #3 - Posted 2003-08-01 02:50:57 »

Both Java3D and JOGL need to use jawt.dll and due to the library search path the java launcher provides it's necessary to dynamically open jawt rather than statically link against it.  To avoid writing C code to dlopen() jawt.dll, both libraries use System.loadLibrary() and there are (as you've found) rules about not opening the same library in two classloaders due to namespace and static variable initialization issues. Note also that JOGL now guards against the case when jawt.dll/ is already opened; there was an issue filed about conflicts between Accessibility and JOGL (check the issue archives). Basically if you initialize Java3D first and JOGL second then things will work, as you've found.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

orrenravid (217 views)
2016-07-16 03:57:23

theagentd (288 views)
2016-07-11 14:28:54

Hydroque (375 views)
2016-07-06 05:56:57

Hydroque (527 views)
2016-07-03 08:52:54

GrandCastle (399 views)
2016-07-01 09:13:47

GrandCastle (392 views)
2016-07-01 09:09:45

CopyableCougar4 (445 views)
2016-06-25 16:56:52

Hydroque (420 views)
2016-06-22 02:17:53

SwampChicken (386 views)
2016-06-20 13:22:57

SwampChicken (306 views)
2016-06-20 13:22:49
Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42

FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17 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‑
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!