The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.



Posted by Matt Gerrans on November 09, 2001 at 3:50 AM

Is winamp registered as the default mp3 handler? That is, if you double-click an mp3 file in Explorer, does it launch WinAmp? If not, you need to register it. WinAmp may have an option for this, but if it doesn't you can do it in Explorer's Folder Options/File Types setting (under the View or Tools menu, depending upon your version of Windows).

Also, for experimentation, you can try doing it in a DOS box on the command line. For instance, I just did this:

start "Classical - Various Artists - 1729 Vivaldi- Mandoline Concerto in C, RV 425.mp3

And the result was Real Player popping up to play the thing. Which I will now change to WinAmp, as Real Player promptly crashed (as usual).

- mfg

> Hi I have two questions. One is regarding java.awt vs javax.swing - what is the difference between the two and when would each be used? Because don't both of them have classes to create a graphical user interface? My second question is regarding Runtime.getRuntime().exec(cmd) - what is considered 'legal' commands that exec will execute? Because I executed Matt's code (The best way to use Runtime.exec() (on Windows, that is)) and a command like 'start "c:\music\a - d.mp3"' (w/o the apostrophe) seems to execute (Winamp opens up and starts playing a - d.mp3), but when I try to execute

> String cmd = "start \"c:\\music\\a - d.mp3\"";
> Runtime.getRuntime().exec(cmd);

> Winamp doesn't start up. Does anyone know what is wrong? Thnx in advance for the help.
> Hiran


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us