This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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!
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...
There is not a 'Program' type in the core JRE. Where did you get this class?
Joined: Mar 28, 2009
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.