• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Window Media Player

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I want to execute window media player from one java program.. and i want to run specific file in media player.. what is the method to call media player and how to pass parameter to media player..

does any one knows ??

Regards
Amit
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Windows Media Player is simply an exe program named "wmplayer.exe". Where it is located will depend on where it is installed, but it is likely in "c:>Program Files\Windows Media Player\". Or you could just have it in your path.

As for the parameters on how to run it, you can take a look at the command line docs at Microsoft:

http://msdn2.microsoft.com/en-us/library/bb262178(VS.85).aspx

Once you figure out the exact command that you want, you can add that command to your Java program via the Runtime class.

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html

Henry
 
Amit Bathla
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great!!!

is there any way to stream file in media player using java.

is there any way to save file which is in buffer of media player using java
 
Amit Bathla
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also what if i want to run one file which is on remote machine..

what is the method to authenticate the network..??
 
Amit Bathla
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i can access the file of remote machine using..

Runtime class..
and then using exec "wmplayer /play \\9.182.241.178\temp\too_cute1.mpg"


but for that i need to have a network session setup with that machine..

how to do that..??
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a similar problem in my development project and have not had any time to work on this but I would like to suggest staying within java for your effort because of cross-platform issues. See: The Java Sound API specification and The Java Media Framework API

There is a hang in many video-grapic calls using popular formats and I just totally miss out on all the latest news such as Britney Spears is an Object Oriented Programmer... because of poorly written code, preferring instead to use Java as opposed to another language where performance counts. It seems as though all the FlashTrash cannot follow the lead of the Minneapolis Musician in the 80's who fell-swooped the Jayhawk's.

(old jokes, probably a year old - don't try to make sense of it)

Becuase of this have scripting in the browser totally defeated and would enjoy working with you on this in the computing in general forum or other forum such as the moderators may direct.
 
Amit Bathla
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Henry,

is there any way to pass the user name and password of the remote machine in my url..??

like

wmplayer /play http:\\hostname\filename

is there any way to embed user name and password in above command.??
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

is there any way to pass the user name and password of the remote machine in my url..??

like

wmplayer /play http:\\hostname\filename

is there any way to embed user name and password in above command.??



Does such a feature exists? I would be interested to know too.

The last time that I needed to get around being challenged for the password while accessing a networked file (in Samba), was to configure the network folder to be a public share. This would remove all security on the shared folder, but I was just using it to quickly transfer non-important files. (and in the intranet)

Henry
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Henry Wong:


Does such a feature exists? I would be interested to know too.

The last time that I needed to get around being challenged for the password while accessing a networked file (in Samba), was to configure the network folder to be a public share. This would remove all security on the shared folder, but I was just using it to quickly transfer non-important files. (and in the intranet)

Henry



Can we transfer this to Security: SSL, LDAP, JCE, JAAS, etc, there are greymeat isssues involved and Pat Farrell seems to be the only one who knows these issues effectively, it is discussed in his thesis: can be modelled as a collection of abstract single-user single-task machines connected at their user interfaces

The user interface is a remarkably slippery mind-field where ideas reign millions of Joe Average to harness a system where most cannot even deal with the idea of a folder, let alone the mapping of a backslash to some disk-head position ( and associated L-2 writebacks ) - all of which represents easily harnessed attack portals.

I was reading a web-page a month ago of a legitimate worker in the field of computer security, a poll was being run as to what is the biggest security problem, an open poll and we do not know who really was replying.

1,500 - the keyboard and associated ( mind )
850 - all other categories combined

For my part, I will only work this further if it shows up in the security forum at javaranch, be though it may I find this subject overly tempting.
 
BWA HA HA HA HA HA HA! Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic