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.


Two Questions...

Posted by Hiran on November 08, 2001 at 5:06 PM

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\"";

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


Sponsored Links

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