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

John Carlson yottzumm at gmail.com
Fri Jun 8 00:05:39 PDT 2018


If you don't see the exception being thrown from X3DLoaderObject, let me
know.

On Fri, Jun 8, 2018, 2:22 AM John Carlson <yottzumm at gmail.com> wrote:

> Don, this is the program we have to debug.   There is no JavaScript except
> for JSON in this code, so there's no need for readAllBytes.
>
> 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/20180608/aa337e78/attachment.html>


More information about the x3d-public mailing list