Solved

Java JMF Manager.CreatePlayer() URL format QUERY

Posted on 1997-04-02
1
1,760 Views
Last Modified: 2013-12-25
Hello,

I am trying to write an application that implements the Java JMF API
using Intel's SDK.

The query I have is how do I pass a local file name (i.e. the
location/name of my mpg/avi) to manager.createplayer() when this method
appears only to accept a complete (URL, file) parameter.

If there is a way to use getdocumentbase() for a local file system, this
would be ideal. Can I extend this and pass my own absolute directory
address instead?

Thanks.
0
Comment
Question by:weblynx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
jpk041897 earned 100 total points
ID: 1854038
The way to access local files is to use the following syntax for a url:

file:///<drive>|/path/file

where <drive> is the dos drive letter and <drive>|/ is used only under dos, not UNIX..

To Use a URL parameter, you must remember that URL is a Java class, to use it you must write code to the effects of:

URL MyURL;

try{
   MyURL = new URL("file:///C|/YourPath/Yourfile.avi);
}catch(MalformedURLException u) {
   System.out.println("Malformed URL erorr: " + u);
}

There are other options for creating URL objects. See the java docs for URL to view them.

You don't need getdocument nase() to access these files unless you are running an applet from a remote site.

Note: You probably would have recieved an answer faster if you had posted this question to the Java topic area.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
QQ problem 22 63
migrating to phpbb forum from vBulletin 4.2 3 25
Why "Mobile First"? 5 35
uploading Theme in Wordpressn - geting error 4 18
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question