【发布时间】:2016-03-11 21:23:46
【问题描述】:
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));
}
}
我设法以某种方式修复它并下载了外部 jar,但我仍然遇到最后一个错误:http://i.imgur.com/3IYfgQG.jpg
【问题讨论】:
-
您是否下载了
javax.ws.rs库并将其添加到您的路径中? -
你是如何管理你的依赖的?马文?手动?
-
我没有下载任何东西。