Eclipse不能识别com.sun.net.httpserver.HttpServer包 [英] Eclipse cant recognize com.sun.net.httpserver.HttpServer package

查看:235
本文介绍了Eclipse不能识别com.sun.net.httpserver.HttpServer包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个家庭工作来创建一个java服务器,一个简单的,从头开始。
搜索google和这里...我发现
这个链接看到最好的回复
有一个非常好的回复,所以我将这个例子复制/粘贴到eclipse,但
它不能识别包

I have a home-work to create a http server with java , a simple one and from scratch . After searching google and here ...i found this link "see the best response" with a very nice response ,so i copy/paste this example to eclipse , but it doesn't recognize the package

import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;


如果不是要求很多你知道一些HttpServer示例的其他链接?
提前谢谢!

can you please help me so i can make eclipse recognize them? Also if isn't asking for to much do you know some other link with a HttpServer example? Thank you in advance !

推荐答案

从1.6开始,JDK应该可以使用。否则,您可以单独添加它的buidpath。请参阅以下链接:

It should be available with JDK from 1.6 onwards. Otherwise, you can add it your buidpath separately. Refer below link:

如何下载com.sun.net.httpserver包?

这篇关于Eclipse不能识别com.sun.net.httpserver.HttpServer包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆