not your standard winamp duff play question
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   alan_dodson
Posted On:   Thursday, March 14, 2002 02:47 AM


I have a java prog running winamp via Runtime.getRuntime().exec("fileName")
which works just fine...


However when the mp3 filename has 2 spaces in it (as example below) it displays in winamp (minus the time) but doesnt run.


The same file will however run in winamp when double-clicked or picked direct from winamp.


Thoughts..? ..


String fileName =


C:Program FilesWinampWinamp.exe


"C: est hereare2 spacesbetweenhere.mp3"

Re: not your standard winamp duff play question

Posted By:   Stephen_Ostermiller  
Posted On:   Thursday, March 14, 2002 04:21 AM

Try:


Runtime.getRuntime().exec(new String[] {"fileName"});


Reason:

Runtime.exec(String) takes a command line of sorts. It splits the string based on whitespace and then uses the first argument as the program to run and each other argument as command line arguments. Runtime.exect(String[]) treats the first string as the program, and each additional string as a command line argument, without any splitting.

About | Sitemap | Contact