I am currently using a command called "curl" from Terminal in Ubuntu, tu upload my .RDF files to a Virtuoso RDF Store.
curl -T FILE URL -u USER:PASSWORD
I want to automatize these process, so that I create a Java function in eclipse. This code is not working.
String[] command = {"curl -T", FILENAME, URL, "-u", credentials.USERNAME+":"+credentials.PASSWORD};
Runtime.getRuntime().exec(command)
I have also tried with this one. The xterm appears, but it shows this error (even though the file is in the Path of the function):
*"/usr/bin/xterm. Can't execvp "curl" no such a directory or file"*
Runtime.getRuntime().exec("/usr/bin/xterm -e \"curl -T " + FILENAME
+ " " + URL + "-u " + credentials.USERNAME
+ ":" + credentials.PASSWORD + "\"");
I would appreciate any help on the matter.
Thanks in advance