Hi Artur, Problem 1 below can be resolved by setting the class loader used by the scene graph io api. Use setClassLoader in SceneGraphFileReader and SceneGraphStreamReader.
As for problem 2, you should be able to use a property System.setProperty("j3d.io.UseSuperClassIfNoChildClass", ""); to force the IO API to do the best it can for j3f files that require classes that are not available. However you seem to have found a bug in the implementation..... We are investigating. Rgds Paul ---------------------------------------------------------- Paul Byrne Email : [EMAIL PROTECTED] Sun Microsystems Phone : (650) 786 9926 Visualization Software Group Fax : (650) 786 5852 ---------------------------------------------------------- >Date: Wed, 01 May 2002 15:28:10 +0200 >From: Artur Biesiadowski <[EMAIL PROTECTED]> >Subject: [JAVA3D] Scenegraph IO >To: [EMAIL PROTECTED] >MIME-version: 1.0 >Content-transfer-encoding: 7bit >X-Accept-Language: en-us, en >Delivered-to: [EMAIL PROTECTED] >User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.9) Gecko/20020311 > >Let's suppose I want to output my scene graph in j3d format. One of >nodes is behaviour, which is my own class. I can implement interface >which will allow to serialize it to stream. But to allow >deserialization, this particular class will have to be in classpath, >doesn't it ? Even more, it will not be possible to load it from jar >dynamically, for example from loader jar, because SceneGraphIO will try >to resolve it from system classloader ? > >In easiest scenario - I have everything in application classpath, and I >load and save it from same application, everything works. But let's >consider more complicated scenarios: > >1) I load my behavior class dynamically in non-system classloader. It >saves without problem, but later during load it will not be resolved. > >2) I want to export file to somebody without my class at all. He will >not be able to read anything from a file (it is obvious he will not be >able to read my behavior, but I'm talking about plain-java3d >geometry/appearance data). > > >Am I right in both cases ? If yes, then it is a big problem. Second case >could be probably solved quite easily/transparently (just add some kind >of flag, which would mean ignore/report unresolved classes, or create >their base classes - so for example for TransformGroup subclass plain >TransformGroup would be created). As for the second problem - there is >not automatic solution I'm afraid. Maybe giving classloader reference to >SceneGraphReader against which it would resolve user-defined classes ? > >Artur > >=========================================================================== >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body >of the message "signoff JAVA3D-INTEREST". For general help, send email to >[EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".