.exec() : Streamripper :

Der_Da_93

Der_Da_93

irgendwie
Hi,
Hab mich mal wieder an einem Programm für streamripper versucht.:
Code:
import java.io.IOException;

public class Main {

	public static void main(String[] args) throws IOException {
		 final String[] stations = {"http://scfire-mtc-aa01.stream.aol.com:80/stream/1074",
				"http://193.251.154.245:8000",
		"http://91.121.192.49:8000"};

		for(String s: stations){
			new Thread(new RipperRunnable(s)).start();
		}
	}
}
und
Code:
import java.io.IOException;


public class RipperRunnable implements Runnable{

	String s = null;
	
	public RipperRunnable(String station) {
		this.s = station;
	}
	@Override
	public void run() {

		String command = "streamripper "+ s+" -s -d /home/klinch/streams --xs_padding=3000:3000";
		try {
			Process p = Runtime.getRuntime().exec(command);
			try {
				p.waitFor();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		} catch (IOException e ) {
			e.printStackTrace();
		}
	}
}
Was dieses Programm machen soll ist glaub ich klar.
Nur find ich keine Dateien in /home/klinch/streams.
Die Unterprogramme laufen aber:
Code:
[klinch@imladris ~]$ ps aux|grep streamripper
klinch    9922  0.0  0.1  14700  2824 ?        Sl   20:46   0:00 streamripper http://scfire-mtc-aa01.stream.aol.com:80/stream/1074 -s-d /home/klinch/streams --xs_padding=3000:3000
klinch    9927  0.1  0.1  14800  3060 ?        Sl   20:46   0:00 streamripper http://193.251.154.245:8000 -s-d /home/klinch/streams --xs_padding=3000:3000
klinch    9929  0.0  0.1  14716  2820 ?        Sl   20:46   0:00 streamripper http://91.121.192.49:8000 -s-d /home/klinch/streams --xs_padding=3000:3000

Auch iptraf zeigt mir 3 aktive UDP-Verbindungen.

Ich weiss echt nicht wieso dies nicht funktioniert.
 

Ähnliche Themen

"non blocking console input" wieder rückgängig machen?

Samba 4.1.11 Domänen anbindung funktioniert nicht !!!

Input == String => false

Samba 4 Gast Zugang unter Ubuntu funktioniert nicht

Rollei Mini Wifi Camcorder

Zurück
Oben