• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Program.launch" but with command-line arguments

 
Mariano Lopez-Gappa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This won't work. Javadoc clearly implies the argument should hold the file to be opened by the program. I need to give the program that /add modifier in order for it to "enqueue" the playlist instead of just playing it. Also this isn't media-player-independent but I don't think there is a standard on enqueuing files. If there is, I'm all ears!

Thanks guys!


PS: I should be able to use Runtime then exec right? But since I don't really know which media player I'm looking for, I must resort to Program.findProgram and it yields a Program object which I can't use with this...
 
Steve Luke
Bartender
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is not a 'Program' type in the core JRE. Where did you get this class?
 
Mariano Lopez-Gappa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes sorry it's in the SWT framework.

Anyway, I got it to work via getRuntime().exec() but I'm assuming the client is using Winamp and also that he installed in the program files default location (default from there on, since I'm using getEnv for Programfiles), otherwise it won't work.

This solution is working but it's not optimal Looking at registry for the Winamp path would be even worse since then it wouldn't even be platform independent. It should be platform-independent and also media-player-independent.

Any clues?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic