while(lgth !=0){
while(!(lgth <=0)){
    public static void main(String[] args) throws Exception{        SoundSystem.init(null, SoundSystem.OUTPUT_DEFAULT);        //replace the path to your files        String path=null;        if(args.length==0){            path="C:\\Evol\\JAVA\\CLAPTON";        }else{            path=args[0];        }        File dir=new File(path);        String[] list=null;        int[] clip=null;        if(dir.isDirectory()){           list=dir.list();        }else{            LoggingSystem.getLogger().log(Level.INFO,"The path entered is not a directory");            LoggingSystem.getLogger().log(Level.INFO,path);            System.exit(-1);        }        ArrayList valid=null;        if(list !=null && list.length>0){            valid=new ArrayList();        }        else{            LoggingSystem.getLogger().log(Level.INFO,"The path entered does not contain any file");            LoggingSystem.getLogger().log(Level.INFO,path);            System.exit(-1);        }        for(int a=0; a<list.length; a++){                int nb=SoundSystem.createStream(path+"\\"+list[a], false);                 if(SoundSystem.isStreamOpened(nb)){                    valid.add(new Integer(nb));                }        }        int nbStream=valid.size();        if(valid.size()>0){                        for(int a=0; a<nbStream; a++){                int music=((Integer)valid.get(a)).intValue();                int lgth=SoundSystem.getStreamLength(music);                LoggingSystem.getLogger().log(Level.INFO,"Length "+(lgth/1000/60)+" m "+(lgth/1000%60)+"s");                SoundSystem.playStream(music);                while(lgth !=0){                    Thread.sleep(1000);                    lgth-=1000;                    System.out.print("\rRemaining "+(lgth/1000/60)+" m "+(lgth/1000%60)+"s");                }                                            }        }                    }