[x3d-public] X3DJSAIL, X3dToJava.xslt and DOM X3DLoaderObjecttesting:anotherClassCastException

John Carlson yottzumm at gmail.com
Thu Jun 14 10:58:45 PDT 2018


This is the Java code with the bug in it.   Don't you get an exception from
X3dLoaderObject?

I will try fixing everything on my Mac with jdk 8.   I can also fix
X3DLoaderObject if you don't want to.

John

> import net.coderextreme.X3DJSONLD;
>>
>> import org.w3c.dom.Document;
>>
>> import javax.json.JsonObject;
>>
>> import java.io.File;
>>
>> import org.web3d.x3d.jsail.X3DLoaderObject;
>>
>> import org.web3d.x3d.jsail.Core.X3DObject;
>>
>>
>>
>> class Java {
>>
>>         public static void main(String [] args) throws Exception {
>>
>>                 X3DJSONLD loader = new X3DJSONLD();
>>
>>                 JsonObject jsobj = loader.readJsonFile(new
>> File("./nashorn/examples/HelloWorldProgramOutput.json"));
>>
>>                 Document document = loader.loadJsonIntoDocument(jsobj);
>>
>>
>> System.out.print(loader.serializeDOM(loader.getX3DVersion(jsobj),
>> document));
>>
>>                 X3DLoaderObject xmlLoader = new X3DLoaderObject();
>>
>>                 X3DObject X3D0 =
>> (X3DObject)xmlLoader.toX3dObjectTree(document);
>>
>>                 X3D0.toFileX3D("./nashorn/examples/Java.x3d");
>>
>>         }
>>
>> }
>>
>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180614/3a54f9e4/attachment.html>


More information about the x3d-public mailing list