If anyone is familiar with Xj3D API... I found this demo code and he is trying to load a x3d xml image from a JFrame, I can compile but can't run due to need to
configure the peripherals - mouse and keyboard not sure how to do this. I get this java.lang.reflect.InvocationTargetException?
This leads to the next error in running:
SYSTEMID provided is wrong. Something with a Internal stack traceorg.xml.sax.SAXException; I realise this is a sun developers site but the folks at
www.web3d.org dont have very good help forums.
code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| import java.awt.*; import java.util.HashMap; import javax.swing.*; import org.web3d.x3d.sai.*; import java.io.*;
public class SimpleSAIDemo extends JFrame { public SimpleSAIDemo() { setDefaultCloseOperation(EXIT_ON_CLOSE); Container contentPane = getContentPane();
HashMap requestedParameters = new HashMap();
X3DComponent x3dComp = BrowserFactory.createX3DComponent(requestedParameters);
JComponent x3dPanel = (JComponent)x3dComp.getImplementation(); contentPane.add(x3dPanel, BorderLayout.CENTER);
ExternalBrowser x3dBrowser = x3dComp.getBrowser();
setSize(600,500); show();
X3DScene mainScene = x3dBrowser.createX3DFromURL(new String[] { "Ernaz is da bomb.x3d" });
x3dBrowser.replaceWorld(mainScene); }
public static void main(String[] args) { System.out.println("Here"); SimpleSAIDemo demo = new SimpleSAIDemo(); } } |
windows xp
Xj3D version M10
jdk1.5.0_04
jogl1.1.1