㈠ java网络编程 如何和互联网上的其他机器建立连接
快速入门的方法是
1先找本asp.net 的基础书(什么都有的 里面简单的介绍C# asp.net 的书 多看几次)了解一下ASP.NET是什么东西
2 在网上下个ASP.NET 的完整代码下来 (要可以运行的 只有几个简单页面的 最好是ACCESS+C#的)把它看懂 安装自己的要求改下 基本了解他的内容
3 自己在电脑上建个主机 或者 买个便宜的 ASP.NET的空间 做个简单的个人网站 建立学习的信心
你基本上就入门了
剩下的 就是不停的 学习 不停 的 改进自己的 网站 不停加新个功能进去
呵呵 我不是学ASP.NET的 我是自学的
希望你成功
㈡ java 如何获取连接网络连接信息
用类java.net.InetAddress中
byte[] getAddress() 返回此 InetAddress 对象的原始 IP 地址。
static InetAddress[] getAllByName(String host) 在给定主机名的情况下,根据系统上配置的名称服务返回其 IP 地址所组成的数组。
static InetAddress getByAddress(byte[] addr) 在给定原始 IP 地址的情况下,返回 InetAddress 对象。
static InetAddress getByAddress(String host, byte[] addr) 根据提供的主机名和 IP 地址创建 InetAddress。
static InetAddress getByName(String host) 在给定主机名的情况下确定主机的 IP 地址。
String getCanonicalHostName() 获取此 IP 地址的完全限定域名。
String getHostAddress() 返回 IP 地址字符串(以文本表现形式)。
String getHostName() 获取此 IP 地址的主机名。
static InetAddress getLocalHost() 返回本地主机。
Enumeration netInterfaces = null;
try {
netInterfaces = NetworkInterface.getNetworkInterfaces();
while (netInterfaces.hasMoreElements()) {
NetworkInterface ni = netInterfaces.nextElement();
System.out.println("DisplayName:" + ni.getDisplayName());
System.out.println("Name:" + ni.getName());
Enumeration ips = ni.getInetAddresses();
while (ips.hasMoreElements()) {
System.out.println("IP:"
+ ips.nextElement().getHostAddress());
}
}
} catch (Exception e) {
e.printStackTrace();
}