Solved

Java JMF Manager.CreatePlayer() URL format QUERY

Posted on 1997-04-02
1
1,752 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Edit a page at wix.com 8 67
Accurate Analytics (Not Google) 2 59
Full width video doesn't shrink on mobile- wordpress, divi 8 63
what are list of ebay api errors 1 28
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
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
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

840 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