Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

X3D files won't load with a URL  RSS feed

 
Matthew Yeend
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making a Xj3D Test class in Java and it's meant to display `X3D` and `X3DV` files. It does work with some test files. But when it comes to the `X3D` files that I've been given, they don't get displayed and I get an error saying:



I have got all the X3D files that I want to use saved in my project as I'm using Netbeans 8.1. I've done some research and I've seen that I might need to use the `createX3DFromStream` method instead of the `createX3DFromURL` method that I currently have in my Java code. My Java code is:

 
Knute Snortum
Sheriff
Posts: 3727
90
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the line causing the problem:

hafodty_cirlce_1.x3dv doesn't look like a URL to me. If hafodty_cirlce_1.x3dv is a file on your disc and you're using Windows, you could try something like file:///C:/your/path/here/hafodty_cirlce_1.x3dv
 
Matthew Yeend
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that 'hafodty_cirlce_1.x3dv' isn't a URL, but there's a URL within the 'hafodty_cirlce_1.x3dv' file. I have the file saved within the Netbeans project and when I've loaded other X3D files such as 'test.x3d', I have the line

which works 100% fine
 
Knute Snortum
Sheriff
Posts: 3727
90
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I guess I'm not going to be much help with this third-party program, but here are some guesses: is it a file text? Can you look inside the file for a URL and test just that? Where did you get the file? I would say the file is the problem and not your program.

I'm posting to the Java in General Forum to see if anyone there can help.
 
Matthew Yeend
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file is an X3D file which is a royalty-free ISO standard XML-based file format for representing 3D computer graphics. I can look inside the file and there is a URL in it and one of my colleagues gave me the file
 
Paul Clapham
Sheriff
Posts: 22215
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:hafodty_cirlce_1.x3dv doesn't look like a URL to me.


Actually it IS a URL: it's a relative URL. But I gather from the other thread, one of the other threads that is, that the URLs which appear to cause the problem are elsewhere, and that isn't the culprit. I was also under the impression that the problem arising from URLs wasn't anything to do with the URLs themselves, but instead that it was a configuration problem in that the DLL which is supposed to handle URLs couldn't be found.

Is that still the case, Matthew? Or did that get fixed up?
 
Matthew Yeend
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm still getting the DLL error which says it's missing and it's in the 'natives' subdirectory and in that is the 'Windows 10' subdirectory and the odejava.dll within the Netbeans Projects that I have in My Documents. I know that the Java class works with testing X3D files that don't have URLs within them.

I don't understand why I'm getting the DLL error when I run the code. And within the X3D files that I'm wanting to use, there are URLs within them such as the following
 
Knute Snortum
Sheriff
Posts: 3727
90
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing that the X3D package was not installed correctly and that something about displaying a file with a URL in it causes the need for the missing DLL. I'd trying reinstalling.
 
Matthew Yeend
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've tried reinstalling as I've recently updated my laptop from Windows 8 to Windows 10 and had to reinstall X3D-Edit 3.3. I'll keep looking to see how I'd make the project use the DLL as it's worked before in other projects.
 
Knute Snortum
Sheriff
Posts: 3727
90
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since X3D Edit 3.3 is new and Windows 10 hasn't been out that long, this may be a bug. Check the issues tracker and if it isn't there, report the bug.
 
Matthew Yeend
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll have a look at that and see if I can find it. Would it work with X3D-Edit 3.1?
 
Knute Snortum
Sheriff
Posts: 3727
90
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect not, but it could be worth a try.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!