First of all , i\'ve already seen couple of documents, stackoverflow questions regarding the same ..I\'ve my project specific question When trying to run command :
hey try this I had the same problem. It worked in my terminal had the same error as yours.
String[] command = {"curl", "-u" , username+ ":" + password , url};
Try changing this line
String[] command = {"curl", "-u" ,"Accept:application/json", username, ":" , password , url};
into
String[] command = {"curl", "-H", "Accept:application/json", "-u", username+":"+password , url};