--我得到了一个错误红线,javax.ws说它不能被解决。我不知道这个错误是否会修复其余的错误,但是我是否应该下载某种库来使其工作呢?
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.MediaType;
public class Face_Recognition {
public static void main(String[] args) {
Client client = ClientBuilder.newClient();
Entity payload = Entity.json("{ 'image': 'http://instinctmagazine.com/sites/instinctmagazine.com/files/images/blog_posts/Nigel%20Campbell/2014/05/13/antonio%20banderas2.jpg', 'subject_id': 'antonio_banderas', 'gallery_name': 'actors', 'selector': 'SETPOSE', 'symmetricFill': 'true'}");
Response response = client.target("https://api.kairos.com/enroll")
.request(MediaType.APPLICATION_JSON_TYPE)
.header("app_id", "xxxx")
.header("app_key", "xxxx")
.post(payload);
System.out.println("status: " + response.getStatus());
System.out.println("headers: " + response.getHeaders());
System.out.println("body:" + response.readEntity(String.class));
}
}我设法修复了它,并下载了外部jars,但我仍然有最后一个错误:http://i.imgur.com/3IYfgQG.jpg
发布于 2016-03-11 21:27:38
首先,确保您在项目上运行了“刷新”。如果没有找到JAR,那么在Eclipse的中导航到它们,右键单击它们,在弹出菜单中使用"Build“>”“。
https://stackoverflow.com/questions/35950184
复制相似问题